mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
This commit is contained in:
parent
a98c4a984b
commit
85b0f5beb1
29 changed files with 60 additions and 61 deletions
|
@ -1941,7 +1941,7 @@ save_long(PicklerObject *self, PyObject *obj)
|
|||
goto error;
|
||||
}
|
||||
else {
|
||||
char *string;
|
||||
const char *string;
|
||||
|
||||
/* proto < 2: write the repr and newline. This is quadratic-time (in
|
||||
the number of digits), in both directions. We add a trailing 'L'
|
||||
|
@ -2218,7 +2218,7 @@ write_unicode_binary(PicklerObject *self, PyObject *obj)
|
|||
{
|
||||
PyObject *encoded = NULL;
|
||||
Py_ssize_t size;
|
||||
char *data;
|
||||
const char *data;
|
||||
int r;
|
||||
|
||||
if (PyUnicode_READY(obj))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue