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
790b0994
Commit
790b0994
authored
Sep 17, 2018
by
Matt Wozniski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perform <object>NULL check for "except +" calls
parent
a19b8a99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+13
-11
No files found.
Cython/Compiler/ExprNodes.py
View file @
790b0994
...
...
@@ -5838,7 +5838,7 @@ class SimpleCallNode(CallNode):
elif
self
.
type
.
is_memoryviewslice
:
assert
self
.
is_temp
exc_checks
.
append
(
self
.
type
.
error_condition
(
self
.
result
()))
el
se
:
el
if
func_type
.
exception_check
!=
'+'
:
exc_val
=
func_type
.
exception_value
exc_check
=
func_type
.
exception_check
if
exc_val
is
not
None
:
...
...
@@ -5859,10 +5859,6 @@ class SimpleCallNode(CallNode):
rhs
=
typecast
(
py_object_type
,
self
.
type
,
rhs
)
else
:
lhs
=
""
if
func_type
.
exception_check
==
'+'
:
translate_cpp_exception
(
code
,
self
.
pos
,
'%s%s;'
%
(
lhs
,
rhs
),
func_type
.
exception_value
,
self
.
nogil
)
else
:
if
(
self
.
overflowcheck
and
self
.
type
.
is_int
and
self
.
type
.
signed
...
...
@@ -5873,6 +5869,12 @@ class SimpleCallNode(CallNode):
goto_error
=
code
.
error_goto_if
(
" && "
.
join
(
exc_checks
),
self
.
pos
)
else
:
goto_error
=
""
if
func_type
.
exception_check
==
'+'
:
translate_cpp_exception
(
code
,
self
.
pos
,
'%s%s;'
%
(
lhs
,
rhs
),
func_type
.
exception_value
,
self
.
nogil
)
if
goto_error
:
code
.
putln
(
goto_error
)
else
:
code
.
putln
(
"%s%s; %s"
%
(
lhs
,
rhs
,
goto_error
))
if
self
.
type
.
is_pyobject
and
self
.
result
():
code
.
put_gotref
(
self
.
py_result
())
...
...
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