diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 10:16:47 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 10:16:47 +0200 |
commit | 85b0f5beb182cca8b1607accce2caab87ee29835 (patch) | |
tree | 0e55ae3180c2836152ceb4f9689fc7ed1ccb71c5 /Modules/_ctypes/stgdict.c | |
parent | a98c4a984b34f887076f4171b1e3303e164cbddf (diff) | |
download | cpython-git-85b0f5beb182cca8b1607accce2caab87ee29835.tar.gz |
Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
Diffstat (limited to 'Modules/_ctypes/stgdict.c')
-rw-r--r-- | Modules/_ctypes/stgdict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c index 716d1e9e8e..53cfa79864 100644 --- a/Modules/_ctypes/stgdict.c +++ b/Modules/_ctypes/stgdict.c @@ -488,8 +488,8 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct bitsize = 0; if (isStruct && !isPacked) { - char *fieldfmt = dict->format ? dict->format : "B"; - char *fieldname = PyUnicode_AsUTF8(name); + const char *fieldfmt = dict->format ? dict->format : "B"; + const char *fieldname = PyUnicode_AsUTF8(name); char *ptr; Py_ssize_t len; char *buf; |