summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-13 10:41:05 (GMT)
committerGitHub <noreply@github.com>2022-05-13 10:41:05 (GMT)
commitf62ad4f2c4214fdc05cc45c27a5c068553c7942c (patch)
tree5c8cf46c3ae7c874ac601f3e18357a1862474fba /Modules/_decimal
parent22a1db378c5c381272362c5b2f68ac78a368e136 (diff)
downloadcpython-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.zip
cpython-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.tar.gz
cpython-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.tar.bz2
gh-89653: Use int type for Unicode kind (#92704)
Use the same type that PyUnicode_FromKindAndData() kind parameter type (public C API): int.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r--Modules/_decimal/_decimal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 5cbddac..548bd60 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -1918,7 +1918,7 @@ dec_dealloc(PyObject *dec)
/******************************************************************************/
Py_LOCAL_INLINE(int)
-is_space(enum PyUnicode_Kind kind, const void *data, Py_ssize_t pos)
+is_space(int kind, const void *data, Py_ssize_t pos)
{
Py_UCS4 ch = PyUnicode_READ(kind, data, pos);
return Py_UNICODE_ISSPACE(ch);
@@ -1935,7 +1935,7 @@ is_space(enum PyUnicode_Kind kind, const void *data, Py_ssize_t pos)
static char *
numeric_as_ascii(PyObject *u, int strip_ws, int ignore_underscores)
{
- enum PyUnicode_Kind kind;
+ int kind;
const void *data;
Py_UCS4 ch;
char *res, *cp;