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
bd55c525
Commit
bd55c525
authored
Jan 17, 2009
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4930: Slightly cleaner (and faster) code in type creation:
compare slots by address, not by name.
parent
d25f87ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Objects/typeobject.c
Objects/typeobject.c
+2
-2
No files found.
Objects/typeobject.c
View file @
bd55c525
...
...
@@ -6114,7 +6114,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
else
if
(
Py_TYPE
(
descr
)
==
&
PyCFunction_Type
&&
PyCFunction_GET_FUNCTION
(
descr
)
==
(
PyCFunction
)
tp_new_wrapper
&&
strcmp
(
p
->
name
,
"__new__"
)
==
0
)
ptr
==
(
void
**
)
&
type
->
tp_new
)
{
/* The __new__ wrapper is not a wrapper descriptor,
so must be special-cased differently.
...
...
@@ -6134,7 +6134,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
point out a bug in this reasoning a beer. */
}
else
if
(
descr
==
Py_None
&&
strcmp
(
p
->
name
,
"__hash__"
)
==
0
)
{
ptr
==
(
void
**
)
&
type
->
tp_hash
)
{
/* We specifically allow __hash__ to be set to None
to prevent inheritance of the default
implementation from object.__hash__ */
...
...
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