Commit f3ae6208 authored by Victor Stinner's avatar Victor Stinner

PyUnicode_GET_SIZE() checks that PyUnicode_AsUnicode() succeed

using an assertion
parent dcbbd9ea
......@@ -390,6 +390,7 @@ PyAPI_DATA(PyTypeObject) PyUnicodeIter_Type;
(((PyASCIIObject *)(op))->wstr) ? \
PyUnicode_WSTR_LENGTH(op) : \
((void)PyUnicode_AsUnicode((PyObject *)(op)), \
assert(((PyASCIIObject *)(op))->wstr), \
PyUnicode_WSTR_LENGTH(op)))
#define PyUnicode_GET_DATA_SIZE(op) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment