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
Gwenaël Samain
cython
Commits
bcd7eff4
Commit
bcd7eff4
authored
Nov 23, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge 0.19.x branch into master
parents
46dac08b
91bbd1ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
Cython/Utility/Exceptions.c
Cython/Utility/Exceptions.c
+10
-1
No files found.
Cython/Utility/Exceptions.c
View file @
bcd7eff4
...
...
@@ -135,6 +135,7 @@ raise_error:
#else
/* Python 3+ */
static
void
__Pyx_Raise
(
PyObject
*
type
,
PyObject
*
value
,
PyObject
*
tb
,
PyObject
*
cause
)
{
PyObject
*
owned_type
=
NULL
,
*
owned_value
=
NULL
,
*
owned_tb
=
NULL
;
if
(
tb
==
Py_None
)
{
tb
=
0
;
}
else
if
(
tb
&&
!
PyTraceBack_Check
(
tb
))
{
...
...
@@ -153,7 +154,11 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
type
=
(
PyObject
*
)
Py_TYPE
(
value
);
}
else
if
(
PyExceptionClass_Check
(
type
))
{
// instantiate the type now (we don't know when and how it will be caught)
PyErr_NormalizeException
(
&
type
,
&
value
,
&
tb
);
PyErr_NormalizeException
(
&
type
,
&
value
,
&
owned_tb
);
if
(
!
tb
&&
owned_tb
)
tb
=
owned_tb
;
owned_type
=
type
;
owned_value
=
value
;
if
(
!
PyExceptionInstance_Check
(
value
))
{
PyErr_Format
(
PyExc_TypeError
,
"calling %R should have returned an instance of "
...
...
@@ -205,6 +210,10 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
}
bad:
Py_XDECREF
(
owned_type
);
Py_XDECREF
(
owned_value
);
Py_XDECREF
(
owned_tb
);
return
;
}
#endif
...
...
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