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
14ec6047
Commit
14ec6047
authored
Mar 31, 2008
by
Felix Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cython and C++ exceptions
parent
fc317380
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-0
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+3
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+4
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
14ec6047
...
...
@@ -1678,6 +1678,14 @@ class SimpleCallNode(ExprNode):
rhs
=
typecast
(
py_object_type
,
self
.
type
,
rhs
)
else
:
lhs
=
""
# <fsw> added for generating C++ try/catch block
if
func_type
.
exception_check
==
'+'
:
code
.
putln
(
"try {%s%s;} catch(...) {CppExn2PyErr(); %s}"
%
(
lhs
,
rhs
,
code
.
error_goto
(
self
.
pos
)))
return
code
.
putln
(
"%s%s; %s"
%
(
lhs
,
...
...
Cython/Compiler/Parsing.py
View file @
14ec6047
...
...
@@ -1645,6 +1645,9 @@ def p_exception_value_clause(s):
if
s
.
sy
==
'*'
:
exc_check
=
1
s
.
next
()
elif
s
.
sy
==
'+'
:
exc_check
=
'+'
s
.
next
()
else
:
if
s
.
sy
==
'?'
:
exc_check
=
1
...
...
Cython/Compiler/PyrexTypes.py
View file @
14ec6047
...
...
@@ -747,8 +747,10 @@ class CFuncType(CType):
exc_clause
=
" except? %s"
%
self
.
exception_value
elif
self
.
exception_value
:
exc_clause
=
" except %s"
%
self
.
exception_value
elif
self
.
exception_check
:
exc_clause
=
" except *"
elif
self
.
exception_check
==
'+'
:
exc_clause
=
" except +"
else
:
" except *"
cc
=
self
.
calling_convention_prefix
()
if
(
not
entity_code
and
cc
)
or
entity_code
.
startswith
(
"*"
):
entity_code
=
"(%s%s)"
%
(
cc
,
entity_code
)
...
...
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