mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Implement PEP 393.
This commit is contained in:
parent
48d49497c5
commit
d63a3b8beb
102 changed files with 8153 additions and 5431 deletions
|
@ -311,9 +311,7 @@ w_object(PyObject *v, WFILE *p)
|
|||
}
|
||||
else if (PyUnicode_CheckExact(v)) {
|
||||
PyObject *utf8;
|
||||
utf8 = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(v),
|
||||
PyUnicode_GET_SIZE(v),
|
||||
"surrogatepass");
|
||||
utf8 = PyUnicode_AsEncodedString(v, "utf8", "surrogatepass");
|
||||
if (utf8 == NULL) {
|
||||
p->depth--;
|
||||
p->error = WFERR_UNMARSHALLABLE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue