summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-25 09:32:09 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-25 09:32:09 (GMT)
commit1bcf35ae39a7db66666b001252886d82c755110b (patch)
treebeee3584c97218d06eabf00fdf994842c0a131be /Objects
parentc9b0953bda1339137a7280ab1b1085abbdf4977a (diff)
downloadcpython-1bcf35ae39a7db66666b001252886d82c755110b.zip
cpython-1bcf35ae39a7db66666b001252886d82c755110b.tar.gz
cpython-1bcf35ae39a7db66666b001252886d82c755110b.tar.bz2
#2963: fix method cache types.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 8880cab..88ce67f 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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;