summaryrefslogtreecommitdiff
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-11 13:06:26 +0200
committerGitHub <noreply@github.com>2017-11-11 13:06:26 +0200
commite2f92de6a90ae11a6d8e01bd17fd88b005516835 (patch)
treea5bc255a98f488e5ecf195dc3f55665e9afecc47 /Modules/_ctypes
parente184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 (diff)
downloadcpython-git-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.gz
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/callproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 3a6ad86e87..bdc3728115 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -1336,7 +1336,7 @@ static PyObject *py_dl_open(PyObject *self, PyObject *args)
handle = ctypes_dlopen(name_str, mode);
Py_XDECREF(name2);
if (!handle) {
- char *errmsg = ctypes_dlerror();
+ const char *errmsg = ctypes_dlerror();
if (!errmsg)
errmsg = "dlopen() error";
PyErr_SetString(PyExc_OSError,