Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
72f37449
Commit
72f37449
authored
May 25, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#2963: fix method cache types.
parent
3d9cddfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Misc/NEWS
Misc/NEWS
+2
-0
Objects/typeobject.c
Objects/typeobject.c
+3
-3
No files found.
Misc/NEWS
View file @
72f37449
...
...
@@ -12,6 +12,8 @@ What's new in Python 3.0b1?
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.
...
...
Objects/typeobject.c
View file @
72f37449
...
...
@@ -20,10 +20,10 @@
>> (8*sizeof(unsigned int) - MCACHE_SIZE_EXP))
#define MCACHE_HASH_METHOD(type, name) \
MCACHE_HASH((type)->tp_version_tag, \
((Py
StringObject *)(name))->ob_s
hash)
((Py
UnicodeObject *)(name))->
hash)
#define MCACHE_CACHEABLE_NAME(name) \
Py
String
_CheckExact(name) && \
Py
String
_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
Py
Unicode
_CheckExact(name) && \
Py
Unicode
_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
struct
method_cache_entry
{
unsigned
int
version
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment