Message301680
PyUnicode_READY() raises an exception when returns -1 (MemoryError or ValueError). Not all code that calls PyUnicode_READY() handles this property. The following PR fixes all uses of PyUnicode_READY().
* If PyUnicode_READY() returns -1 the caller should either fail immediately or clear the error.
* The raised exception shouldn't be replaced by PyErr_BadArgument().
* In MCACHE_CACHEABLE_NAME PyUnicode_READY() is replaced with PyUnicode_IS_READY(). This is just the check for fast path. |
|
Date |
User |
Action |
Args |
2017-09-08 06:12:20 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, benjamin.peterson |
2017-09-08 06:12:20 | serhiy.storchaka | set | messageid: <1504851140.29.0.00676251458119.issue31393@psf.upfronthosting.co.za> |
2017-09-08 06:12:20 | serhiy.storchaka | link | issue31393 messages |
2017-09-08 06:12:20 | serhiy.storchaka | create | |
|