mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Port error handlers from Py_UNICODE indexing to code point indexing.
This commit is contained in:
parent
495dcbd5c1
commit
b09af03b8a
2 changed files with 51 additions and 77 deletions
|
@ -1513,6 +1513,11 @@ UnicodeEncodeError_init(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (PyUnicode_READY(err->object) < -1) {
|
||||
err->encoding = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Py_INCREF(err->encoding);
|
||||
Py_INCREF(err->object);
|
||||
Py_INCREF(err->reason);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue