Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
f00f3b54
Commit
f00f3b54
authored
May 26, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved method cache invalidation next to dict update, as proposed by Lisandro
parent
13e888fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+6
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+0
-5
No files found.
Cython/Compiler/ExprNodes.py
View file @
f00f3b54
...
...
@@ -989,6 +989,12 @@ class NameNode(AtomicExprNode):
namespace
,
self
.
interned_cname
,
rhs
.
py_result
()))
# in Py2.6+, we need to invalidate the method cache
typeptr_cname
=
entry
.
scope
.
parent_type
.
typeptr_cname
code
.
putln
(
"#if PY_VERSION_HEX >= 0x02060000"
)
code
.
putln
(
"(%s)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;"
%
typeptr_cname
)
code
.
putln
(
"#endif"
)
else
:
code
.
put_error_if_neg
(
self
.
pos
,
'PyObject_SetAttr(%s, %s, %s)'
%
(
...
...
Cython/Compiler/Nodes.py
View file @
f00f3b54
...
...
@@ -2101,11 +2101,6 @@ class CClassDefNode(StatNode, BlockNode):
# default values of method arguments.
if
self
.
body
:
self
.
body
.
generate_execution_code
(
code
)
# in Py2.6+, we need to invalidate the type cache
code
.
putln
(
"#if PY_VERSION_HEX >= 0x02060000"
)
code
.
putln
(
"(%s)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;"
%
self
.
entry
.
type
.
typeptr_cname
)
code
.
putln
(
"#endif"
)
def
annotate
(
self
,
code
):
if
self
.
body
:
...
...
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