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
cae4fe60
Commit
cae4fe60
authored
Oct 18, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python calls SetTraceback() later, so should we
parent
3260ece5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+8
-5
No files found.
Cython/Compiler/Nodes.py
View file @
cae4fe60
...
@@ -5075,10 +5075,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
...
@@ -5075,10 +5075,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
if (tb != tmp_tb) {
if (tb != tmp_tb) {
Py_INCREF(tb);
Py_INCREF(tb);
tstate->curexc_traceback = tb;
tstate->curexc_traceback = tb;
value = tstate->curexc_value;
if (value && value != Py_None) {
PyException_SetTraceback(value, tb);
}
Py_XDECREF(tmp_tb);
Py_XDECREF(tmp_tb);
}
}
}
}
...
@@ -5108,8 +5104,12 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
...
@@ -5108,8 +5104,12 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
tstate->curexc_value = 0;
tstate->curexc_value = 0;
tstate->curexc_traceback = 0;
tstate->curexc_traceback = 0;
PyErr_NormalizeException(&local_type, &local_value, &local_tb);
PyErr_NormalizeException(&local_type, &local_value, &local_tb);
if (tstate->curexc_type)
if (unlikely(tstate->curexc_type))
goto bad;
#if PY_MAJOR_VERSION >= 3
if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
goto bad;
goto bad;
#endif
*type = local_type;
*type = local_type;
*value = local_value;
*value = local_value;
*tb = local_tb;
*tb = local_tb;
...
@@ -5145,6 +5145,9 @@ bad:
...
@@ -5145,6 +5145,9 @@ bad:
get_exception_tuple_utility_code
=
UtilityCode
(
proto
=
"""
get_exception_tuple_utility_code
=
UtilityCode
(
proto
=
"""
static PyObject *__Pyx_GetExceptionTuple(void); /*proto*/
static PyObject *__Pyx_GetExceptionTuple(void); /*proto*/
"""
,
"""
,
# I doubt that calling __Pyx_GetException() here is correct as it moves
# the exception from tstate->curexc_* to tstate->exc_*, which prevents
# exception handlers later on from receiving it.
impl
=
"""
impl
=
"""
static PyObject *__Pyx_GetExceptionTuple(void) {
static PyObject *__Pyx_GetExceptionTuple(void) {
PyObject *type = NULL, *value = NULL, *tb = NULL;
PyObject *type = NULL, *value = NULL, *tb = NULL;
...
...
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