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
4ee67a32
Commit
4ee67a32
authored
Jun 26, 2019
by
gsamain
Committed by
Xavier Thompson
Aug 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lock result object before pushing to it
parent
fb28d7ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+7
-4
No files found.
Cython/Compiler/ModuleNode.py
View file @
4ee67a32
...
...
@@ -1506,10 +1506,13 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"Cy_UNLOCK(this->%s);"
%
target_object_cname
)
put_cypclass_op_on_narg_optarg
(
lambda
_
:
"Cy_UNLOCK"
,
reified_function_entry
.
type
,
Naming
.
optional_args_cname
,
code
)
code
.
putln
(
"/* Push result in the result object */"
)
if
reified_function_entry
.
type
.
return_type
is
PyrexTypes
.
c_int_type
:
code
.
putln
(
"this->%s->pushIntResult(result);"
%
result_attr_cname
)
elif
does_return
:
code
.
putln
(
"this->%s->pushVoidStarResult((void*)result);"
%
result_attr_cname
)
if
does_return
:
code
.
putln
(
"Cy_WLOCK(this->%s);"
%
result_attr_cname
)
if
reified_function_entry
.
type
.
return_type
is
PyrexTypes
.
c_int_type
:
code
.
putln
(
"this->%s->pushIntResult(result);"
%
result_attr_cname
)
else
:
code
.
putln
(
"this->%s->pushVoidStarResult((void*)result);"
%
result_attr_cname
)
code
.
putln
(
"Cy_UNLOCK(this->%s);"
%
result_attr_cname
)
code
.
putln
(
"return 1;"
)
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