Skip to content

Commit

Permalink
decimal: backport build fixes
Browse files Browse the repository at this point in the history
part of python#24962
  • Loading branch information
lazka committed Apr 24, 2022
1 parent 67e5c49 commit 44249b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 44249b7

Please sign in to comment.