[Python-3000-checkins] r63621 - in python/branches/py3k: Misc/NEWS Objects/typeobject.c
georg.brandl
python-3000-checkins at python.org
Sun May 25 11:32:09 CEST 2008
Author: georg.brandl
Date: Sun May 25 11:32:09 2008
New Revision: 63621
Log:
#2963: fix method cache types.
Modified:
python/branches/py3k/Misc/NEWS
python/branches/py3k/Objects/typeobject.c
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sun May 25 11:32:09 2008
@@ -12,6 +12,8 @@
Core and Builtins
-----------------
+- Issue #2963: fix merging oversight that disabled method cache for all types.
+
- Issue #2964: fix a missing INCREF in instancemethod_descr_get.
- Issue 2895: Don't crash when given bytes objects as keyword names.
Modified: python/branches/py3k/Objects/typeobject.c
==============================================================================
--- python/branches/py3k/Objects/typeobject.c (original)
+++ python/branches/py3k/Objects/typeobject.c Sun May 25 11:32:09 2008
@@ -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;
More information about the Python-3000-checkins
mailing list