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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
56b6a6d9
Commit
56b6a6d9
authored
Aug 09, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
be a tiny bit smarter about when to GC_Track for the base type in tp_dealloc()
parent
1010f578
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+5
-2
No files found.
Cython/Compiler/ModuleNode.py
View file @
56b6a6d9
...
@@ -1243,8 +1243,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1243,8 +1243,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
needs_gc
:
if
needs_gc
:
# The base class deallocator probably expects this to be tracked,
# The base class deallocator probably expects this to be tracked,
# so undo the untracking above.
# so undo the untracking above.
code
.
putln
(
"if (PyType_IS_GC(Py_TYPE(o)->tp_base))"
if
base_type
.
scope
and
base_type
.
scope
.
needs_gc
():
" PyObject_GC_Track(o);"
)
code
.
putln
(
"PyObject_GC_Track(o);"
)
else
:
code
.
putln
(
"if (PyType_IS_GC(Py_TYPE(o)->tp_base))"
" PyObject_GC_Track(o);"
)
tp_dealloc
=
TypeSlots
.
get_base_slot_function
(
scope
,
tp_slot
)
tp_dealloc
=
TypeSlots
.
get_base_slot_function
(
scope
,
tp_slot
)
if
tp_dealloc
is
not
None
:
if
tp_dealloc
is
not
None
:
...
...
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