mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Implement PEP 393.
This commit is contained in:
parent
48d49497c5
commit
d63a3b8beb
102 changed files with 8153 additions and 5431 deletions
|
|
@ -1867,9 +1867,7 @@ save_unicode(PicklerObject *self, PyObject *obj)
|
|||
if (self->bin) {
|
||||
char pdata[5];
|
||||
|
||||
encoded = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj),
|
||||
PyUnicode_GET_SIZE(obj),
|
||||
"surrogatepass");
|
||||
encoded = PyUnicode_AsEncodedString(obj, "utf-8", "surrogatepass");
|
||||
if (encoded == NULL)
|
||||
goto error;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue