bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)

This commit is contained in:
Serhiy Storchaka 2020-04-11 10:48:40 +03:00 committed by GitHub
parent 7ec43a7309
commit cd8295ff75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 250 additions and 221 deletions

View file

@ -496,7 +496,7 @@ nfd_nfkd(PyObject *self, PyObject *input, int k)
Py_UCS4 *output;
Py_ssize_t i, o, osize;
int kind;
void *data;
const void *data;
/* Longest decomposition in Unicode 3.2: U+FDFA */
Py_UCS4 stack[20];
Py_ssize_t space, isize;
@ -643,7 +643,7 @@ nfc_nfkc(PyObject *self, PyObject *input, int k)
{
PyObject *result;
int kind;
void *data;
const void *data;
Py_UCS4 *output;
Py_ssize_t i, i1, o, len;
int f,l,index,index1,comb;
@ -804,7 +804,7 @@ is_normalized_quickcheck(PyObject *self, PyObject *input,
Py_ssize_t i, len;
int kind;
void *data;
const void *data;
unsigned char prev_combining = 0;
/* The two quickcheck bits at this shift have type QuickcheckResult. */