Skip to content

Commit

Permalink
bpo-41369: Finish updating the vendored libmpdec to version 2.5.1 (py…
Browse files Browse the repository at this point in the history
…thonGH-24962)

Complete the update to libmpdec-2.5.1.

Co-authored-by: Stefan Krah <[email protected]>
(removed everything but module update for Gentoo)
  • Loading branch information
pitrou authored and mgorny committed Sep 7, 2024
1 parent a6916d9 commit a9ffcd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3284,7 +3284,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 @@ -3293,7 +3293,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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@ def detect_decimal(self):
undef_macros = []
if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
include_dirs = []
libraries = [':libmpdec.so.2']
libraries = ['mpdec']
sources = ['_decimal/_decimal.c']
depends = ['_decimal/docstrings.h']
else:
Expand Down

0 comments on commit a9ffcd6

Please sign in to comment.