mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 74664 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r74664 | thomas.heller | 2009-09-04 20:24:41 +0200 (Fr, 04 Sep 2009) | 1 line Issue 6239: ctypes.c_char_p return value must return bytes. ........
This commit is contained in:
parent
c35adc082d
commit
e83c938e21
15 changed files with 60 additions and 57 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue