diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-04-11 07:48:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 07:48:40 (GMT) |
commit | cd8295ff758891f21084a6a5ad3403d35dda38f7 (patch) | |
tree | a77f829dea34198a7f36658c6e22baf4bc0bf5f5 /Modules/_decimal | |
parent | 7ec43a73092d43c6c95e7dd2669f49d54b57966f (diff) | |
download | cpython-cd8295ff758891f21084a6a5ad3403d35dda38f7.zip cpython-cd8295ff758891f21084a6a5ad3403d35dda38f7.tar.gz cpython-cd8295ff758891f21084a6a5ad3403d35dda38f7.tar.bz2 |
bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)
Diffstat (limited to 'Modules/_decimal')
-rw-r--r-- | Modules/_decimal/_decimal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index b36e309..cdc942f 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -1878,7 +1878,7 @@ dec_dealloc(PyObject *dec) /******************************************************************************/ Py_LOCAL_INLINE(int) -is_space(enum PyUnicode_Kind kind, void *data, Py_ssize_t pos) +is_space(enum PyUnicode_Kind kind, const void *data, Py_ssize_t pos) { Py_UCS4 ch = PyUnicode_READ(kind, data, pos); return Py_UNICODE_ISSPACE(ch); @@ -1896,7 +1896,7 @@ static char * numeric_as_ascii(const PyObject *u, int strip_ws, int ignore_underscores) { enum PyUnicode_Kind kind; - void *data; + const void *data; Py_UCS4 ch; char *res, *cp; Py_ssize_t j, len; |