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
3402988d
Commit
3402988d
authored
Nov 05, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable the refnanny for the separate mod-init step functions as it is required for temp checking.
parent
6ff0eee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+5
-1
No files found.
Cython/Compiler/ModuleNode.py
View file @
3402988d
...
@@ -2495,13 +2495,16 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -2495,13 +2495,16 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
enter_cfunc_scope
(
scope
)
code
.
enter_cfunc_scope
(
scope
)
prototypes
.
putln
(
"static int %s(void); /*proto*/"
%
self
.
cfunc_name
)
prototypes
.
putln
(
"static int %s(void); /*proto*/"
%
self
.
cfunc_name
)
code
.
putln
(
"static int %s(void) {"
%
self
.
cfunc_name
)
code
.
putln
(
"static int %s(void) {"
%
self
.
cfunc_name
)
code
.
put_declare_refcount_context
()
self
.
tempdecl_code
=
code
.
insertion_point
()
code
.
put_setup_refcount_context
(
self
.
cfunc_name
)
# Leave a grepable marker that makes it easy to find the generator source.
# Leave a grepable marker that makes it easy to find the generator source.
code
.
putln
(
"/*--- %s ---*/"
%
self
.
description
)
code
.
putln
(
"/*--- %s ---*/"
%
self
.
description
)
self
.
tempdecl_code
=
code
.
insertion_point
()
return
code
return
code
def
__exit__
(
self
,
*
args
):
def
__exit__
(
self
,
*
args
):
code
=
function_code
code
=
function_code
code
.
put_finish_refcount_context
()
code
.
putln
(
"return 0;"
)
code
.
putln
(
"return 0;"
)
self
.
tempdecl_code
.
put_temp_declarations
(
code
.
funcstate
)
self
.
tempdecl_code
.
put_temp_declarations
(
code
.
funcstate
)
...
@@ -2512,6 +2515,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -2512,6 +2515,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
put_label
(
code
.
error_label
)
code
.
put_label
(
code
.
error_label
)
for
cname
,
type
in
code
.
funcstate
.
all_managed_temps
():
for
cname
,
type
in
code
.
funcstate
.
all_managed_temps
():
code
.
put_xdecref
(
cname
,
type
)
code
.
put_xdecref
(
cname
,
type
)
code
.
put_finish_refcount_context
()
code
.
putln
(
"return -1;"
)
code
.
putln
(
"return -1;"
)
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
code
.
exit_cfunc_scope
()
code
.
exit_cfunc_scope
()
...
...
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