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
Kirill Smelkov
cython
Commits
a85eaad1
Commit
a85eaad1
authored
Oct 29, 2017
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to try/finally code generation [should silence Coverity Scan]
parent
74409491
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-3
No files found.
Cython/Compiler/Nodes.py
View file @
a85eaad1
...
...
@@ -7139,6 +7139,7 @@ class TryFinallyStatNode(StatNode):
code
.
putln
(
'}'
)
if
preserve_error
:
code
.
put_label
(
new_error_label
)
code
.
putln
(
'/*exception exit:*/{'
)
if
not
self
.
in_generator
:
code
.
putln
(
"__Pyx_PyThreadState_declare"
)
...
...
@@ -7156,7 +7157,6 @@ class TryFinallyStatNode(StatNode):
exc_vars
=
tuple
([
code
.
funcstate
.
allocate_temp
(
py_object_type
,
manage_ref
=
False
)
for
_
in
range
(
6
)])
code
.
put_label
(
new_error_label
)
self
.
put_error_catcher
(
code
,
temps_to_clean_up
,
exc_vars
,
exc_lineno_cnames
,
exc_filename_cname
)
finally_old_labels
=
code
.
all_new_labels
()
...
...
@@ -7249,11 +7249,11 @@ class TryFinallyStatNode(StatNode):
code
.
globalstate
.
use_utility_code
(
get_exception_utility_code
)
code
.
globalstate
.
use_utility_code
(
swap_exception_utility_code
)
code
.
putln
(
' '
.
join
([
"%s = 0;"
]
*
len
(
exc_vars
))
%
exc_vars
)
if
self
.
is_try_finally_in_nogil
:
code
.
put_ensure_gil
(
declare_gilstate
=
False
)
code
.
putln
(
"__Pyx_PyThreadState_assign"
)
code
.
putln
(
' '
.
join
([
"%s = 0;"
%
var
for
var
in
exc_vars
]))
for
temp_name
,
type
in
temps_to_clean_up
:
code
.
put_xdecref_clear
(
temp_name
,
type
)
...
...
@@ -7298,7 +7298,7 @@ class TryFinallyStatNode(StatNode):
if
self
.
is_try_finally_in_nogil
:
code
.
put_release_ensured_gil
()
code
.
putln
(
' '
.
join
([
"%s = 0;"
]
*
len
(
exc_vars
))
%
exc_vars
)
code
.
putln
(
' '
.
join
([
"%s = 0;"
%
var
for
var
in
exc_vars
])
)
if
exc_lineno_cnames
:
code
.
putln
(
"%s = %s; %s = %s; %s = %s;"
%
(
Naming
.
lineno_cname
,
exc_lineno_cnames
[
0
],
...
...
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