diff options
author | Stefan Krah <skrah@bytereef.org> | 2021-05-12 05:40:44 +0800 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-05-12 05:47:33 +0800 |
commit | 00d92d8c3d0640d1c1850e508c38f907bd1a3b92 (patch) | |
tree | 06686b7f7534b6c671a998715a2307864ed160e5 /lang/python37/files/patch-Modules___decimal___decimal.c | |
parent | devel/readline: Update documentation for inputrc path (diff) |
lang/python37: Use libmpdec from ports
- Bump PORTREVISION for dependency and package change
PR: 253601
Diffstat (limited to 'lang/python37/files/patch-Modules___decimal___decimal.c')
-rw-r--r-- | lang/python37/files/patch-Modules___decimal___decimal.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lang/python37/files/patch-Modules___decimal___decimal.c b/lang/python37/files/patch-Modules___decimal___decimal.c new file mode 100644 index 000000000000..b93340cc3f40 --- /dev/null +++ b/lang/python37/files/patch-Modules___decimal___decimal.c @@ -0,0 +1,32 @@ +--- Modules/_decimal/_decimal.c.orig 2021-02-17 21:21:24 UTC ++++ Modules/_decimal/_decimal.c +@@ -58,6 +58,11 @@ + + #define BOUNDS_CHECK(x, MIN, MAX) x = (x < MIN || MAX < x) ? MAX : x + ++#if defined(__GNUC__) && !defined(__INTEL_COMPILER) ++ #define UNUSED __attribute__((unused)) ++#else ++ #define UNUSED ++#endif + + /* _Py_DEC_MINALLOC >= MPD_MINALLOC */ + #define _Py_DEC_MINALLOC 4 +@@ -3277,7 +3282,7 @@ dec_format(PyObject *dec, PyObject *args) + } + else { + size_t n = strlen(spec.dot); +- if (n > 1 || (n == 1 && !isascii((uchar)spec.dot[0]))) { ++ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.dot[0]))) { + /* fix locale dependent non-ascii characters */ + dot = dotsep_as_utf8(spec.dot); + if (dot == NULL) { +@@ -3286,7 +3291,7 @@ dec_format(PyObject *dec, PyObject *args) + spec.dot = PyBytes_AS_STRING(dot); + } + n = strlen(spec.sep); +- if (n > 1 || (n == 1 && !isascii((uchar)spec.sep[0]))) { ++ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.sep[0]))) { + /* fix locale dependent non-ascii characters */ + sep = dotsep_as_utf8(spec.sep); + if (sep == NULL) { |