mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
#2963: fix method cache types.
This commit is contained in:
parent
c9b0953bda
commit
1bcf35ae39
2 changed files with 5 additions and 3 deletions
|
|
@ -20,10 +20,10 @@
|
|||
>> (8*sizeof(unsigned int) - MCACHE_SIZE_EXP))
|
||||
#define MCACHE_HASH_METHOD(type, name) \
|
||||
MCACHE_HASH((type)->tp_version_tag, \
|
||||
((PyStringObject *)(name))->ob_shash)
|
||||
((PyUnicodeObject *)(name))->hash)
|
||||
#define MCACHE_CACHEABLE_NAME(name) \
|
||||
PyString_CheckExact(name) && \
|
||||
PyString_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
|
||||
PyUnicode_CheckExact(name) && \
|
||||
PyUnicode_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
|
||||
|
||||
struct method_cache_entry {
|
||||
unsigned int version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue