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
9a3489c1
Commit
9a3489c1
authored
Feb 22, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ref-counting for the module object in the module init function
parent
6f3769d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-4
No files found.
Cython/Compiler/ModuleNode.py
View file @
9a3489c1
...
...
@@ -1582,7 +1582,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
header3
)
code
.
putln
(
"#endif"
)
code
.
putln
(
"{"
)
code
.
putln
(
"PyObject* %s;"
%
Naming
.
retval_cname
)
tempdecl_code
=
code
.
insertion_point
()
code
.
putln
(
"#ifdef CYTHON_REFNANNY"
)
...
...
@@ -1643,13 +1642,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env
.
use_utility_code
(
import_module_utility_code
)
code
.
putln
(
"if (__Pyx_RegisterCleanup()) %s;"
%
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
"%s = %s;"
%
(
Naming
.
retval_cname
,
env
.
module_cname
))
code
.
put_goto
(
code
.
return_label
)
code
.
put_label
(
code
.
error_label
)
code
.
put_var_xdecrefs
(
env
.
temp_entries
)
code
.
putln
(
'__Pyx_AddTraceback("%s");'
%
env
.
qualified_name
)
env
.
use_utility_code
(
Nodes
.
traceback_utility_code
)
code
.
put
ln
(
"%s = NULL;"
%
Naming
.
retval_cnam
e
)
code
.
put
_decref_clear
(
env
.
module_cname
,
py_object_type
,
nanny
=
Fals
e
)
code
.
put_label
(
code
.
return_label
)
code
.
put_finish_refcount_context
()
...
...
@@ -1657,7 +1655,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"#if PY_MAJOR_VERSION < 3"
)
code
.
putln
(
"return;"
)
code
.
putln
(
"#else"
)
code
.
putln
(
"return %s;"
%
Naming
.
retval
_cname
)
code
.
putln
(
"return %s;"
%
env
.
module
_cname
)
code
.
putln
(
"#endif"
)
code
.
putln
(
'}'
)
...
...
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