mirror of
https://github.com/python/cpython.git
synced 2025-10-27 16:57:08 +00:00
PyUnicode_AsEncodedString() returns a bytes object.
This commit is contained in:
parent
13eb6cad7e
commit
e16d2502d2
1 changed files with 2 additions and 1 deletions
|
|
@ -1343,7 +1343,8 @@ z_set(void *ptr, PyObject *value, Py_ssize_t size)
|
|||
conversion_mode_errors);
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
*(char **)ptr = PyString_AS_STRING(str);
|
||||
assert(PyBytes_Check(str));
|
||||
*(char **)ptr = PyBytes_AS_STRING(str);
|
||||
return str;
|
||||
} else if (PyInt_Check(value) || PyLong_Check(value)) {
|
||||
#if SIZEOF_VOID_P == SIZEOF_LONG_LONG
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue