diff options
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 0be8f697ff..fcc8c2a83d 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -2512,7 +2512,7 @@ _get_name(PyObject *obj, char **pname) #endif if (PyString_Check(obj) || PyUnicode_Check(obj)) { *pname = PyString_AsString(obj); - return pname ? 1 : 0; + return *pname ? 1 : 0; } PyErr_SetString(PyExc_TypeError, "function name must be string or integer"); |