mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
bpo-31393: Fix the use of PyUnicode_READY(). (#3451)
This commit is contained in:
parent
70c2dd306f
commit
e3b2b4b8d9
5 changed files with 30 additions and 14 deletions
|
@ -30,9 +30,9 @@ class object "PyObject *" "&PyBaseObject_Type"
|
|||
#define MCACHE_HASH_METHOD(type, name) \
|
||||
MCACHE_HASH((type)->tp_version_tag, \
|
||||
((PyASCIIObject *)(name))->hash)
|
||||
#define MCACHE_CACHEABLE_NAME(name) \
|
||||
PyUnicode_CheckExact(name) && \
|
||||
PyUnicode_READY(name) != -1 && \
|
||||
#define MCACHE_CACHEABLE_NAME(name) \
|
||||
PyUnicode_CheckExact(name) && \
|
||||
PyUnicode_IS_READY(name) && \
|
||||
PyUnicode_GET_LENGTH(name) <= MCACHE_MAX_ATTR_SIZE
|
||||
|
||||
struct method_cache_entry {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue