Line 0
Link Here
|
|
|
1 |
--- Modules/_decimal/_decimal.c.orig 2021-02-17 21:21:24 UTC |
2 |
+++ Modules/_decimal/_decimal.c |
3 |
@@ -58,6 +58,11 @@ |
4 |
|
5 |
#define BOUNDS_CHECK(x, MIN, MAX) x = (x < MIN || MAX < x) ? MAX : x |
6 |
|
7 |
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER) |
8 |
+ #define UNUSED __attribute__((unused)) |
9 |
+#else |
10 |
+ #define UNUSED |
11 |
+#endif |
12 |
|
13 |
/* _Py_DEC_MINALLOC >= MPD_MINALLOC */ |
14 |
#define _Py_DEC_MINALLOC 4 |
15 |
@@ -3277,7 +3282,7 @@ dec_format(PyObject *dec, PyObject *args) |
16 |
} |
17 |
else { |
18 |
size_t n = strlen(spec.dot); |
19 |
- if (n > 1 || (n == 1 && !isascii((uchar)spec.dot[0]))) { |
20 |
+ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.dot[0]))) { |
21 |
/* fix locale dependent non-ascii characters */ |
22 |
dot = dotsep_as_utf8(spec.dot); |
23 |
if (dot == NULL) { |
24 |
@@ -3286,7 +3291,7 @@ dec_format(PyObject *dec, PyObject *args) |
25 |
spec.dot = PyBytes_AS_STRING(dot); |
26 |
} |
27 |
n = strlen(spec.sep); |
28 |
- if (n > 1 || (n == 1 && !isascii((uchar)spec.sep[0]))) { |
29 |
+ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.sep[0]))) { |
30 |
/* fix locale dependent non-ascii characters */ |
31 |
sep = dotsep_as_utf8(spec.sep); |
32 |
if (sep == NULL) { |