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
Boxiang Sun
cython
Commits
abe914c4
Commit
abe914c4
authored
Aug 06, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor C code simplification
parent
8db6825e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-4
No files found.
Cython/Compiler/ModuleNode.py
View file @
abe914c4
...
@@ -1187,14 +1187,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1187,14 +1187,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
cpp_class_attrs
:
if
cpp_class_attrs
:
self
.
generate_self_cast
(
scope
,
code
)
self
.
generate_self_cast
(
scope
,
code
)
if
needs_gc
and
not
base_type
:
code
.
putln
(
"PyObject_GC_UnTrack(o);"
)
if
needs_finalisation
:
if
needs_finalisation
:
# before Py3.4, tp_finalize() isn't available, so this is
# before Py3.4, tp_finalize() isn't available, so this is
# the earliest possible time where we can call it ourselves
# the earliest possible time where we can call it ourselves
code
.
putln
(
"#if PY_VERSION_HEX < 0x030400a1"
)
code
.
putln
(
"#if PY_VERSION_HEX < 0x030400a1"
)
if
needs_gc
and
base_type
:
if
needs_gc
:
# We must mark ths object as (gc) untracked while tearing
# We must mark ths object as (gc) untracked while tearing
# it down, lest the garbage collection is invoked while
# it down, lest the garbage collection is invoked while
# running this destructor.
# running this destructor.
...
@@ -1207,6 +1204,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1207,6 +1204,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"PyObject_GC_Track(o);"
)
code
.
putln
(
"PyObject_GC_Track(o);"
)
code
.
putln
(
"#endif"
)
code
.
putln
(
"#endif"
)
if
needs_gc
and
not
base_type
:
code
.
putln
(
"PyObject_GC_UnTrack(o);"
)
for
entry
in
cpp_class_attrs
:
for
entry
in
cpp_class_attrs
:
split_cname
=
entry
.
type
.
cname
.
split
(
'::'
)
split_cname
=
entry
.
type
.
cname
.
split
(
'::'
)
destructor_name
=
split_cname
.
pop
()
destructor_name
=
split_cname
.
pop
()
...
...
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