From ce1088caeb381a0a16c6dae89b56503c61f2044a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 23 Sep 2021 09:55:32 +0200 Subject: [PATCH] decimal: backport build fixes part of https://github.com/python/cpython/pull/24962 --- Modules/_decimal/_decimal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index d80d7915507d9f..28fd2097ff4872 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -3279,7 +3279,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) { @@ -3288,7 +3288,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) {