diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/cfield.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index d7966a5..f7fd7fa 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -1428,7 +1428,8 @@ z_get(void *ptr, Py_ssize_t size) return NULL; } #endif - return PyUnicode_FromString(*(char **)ptr); + return PyBytes_FromStringAndSize(*(char **)ptr, + strlen(*(char **)ptr)); } else { Py_INCREF(Py_None); return Py_None; |