summaryrefslogtreecommitdiff
path: root/Modules/_ctypes/stgdict.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 10:16:47 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 10:16:47 +0200
commit85b0f5beb182cca8b1607accce2caab87ee29835 (patch)
tree0e55ae3180c2836152ceb4f9689fc7ed1ccb71c5 /Modules/_ctypes/stgdict.c
parenta98c4a984b34f887076f4171b1e3303e164cbddf (diff)
downloadcpython-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.c4
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;