mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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
|
|
@ -1624,7 +1624,7 @@ consistent method resolution\norder (MRO) for bases");
|
|||
i = 0;
|
||||
while (PyDict_Next(set, &i, &k, &v) && (size_t)off < sizeof(buf)) {
|
||||
PyObject *name = class_name(k);
|
||||
char *name_str;
|
||||
const char *name_str;
|
||||
if (name != NULL) {
|
||||
name_str = PyUnicode_AsUTF8(name);
|
||||
if (name_str == NULL)
|
||||
|
|
@ -2572,7 +2572,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
|
|||
PyObject *doc = _PyDict_GetItemId(dict, &PyId___doc__);
|
||||
if (doc != NULL && PyUnicode_Check(doc)) {
|
||||
Py_ssize_t len;
|
||||
char *doc_str;
|
||||
const char *doc_str;
|
||||
char *tp_doc;
|
||||
|
||||
doc_str = PyUnicode_AsUTF8(doc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue