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
acbda9dd
Commit
acbda9dd
authored
Feb 22, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proposed fix to prevent exception chaining in Py3
parent
e24f88f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+23
-8
No files found.
Cython/Compiler/Nodes.py
View file @
acbda9dd
...
@@ -4868,14 +4868,19 @@ static void __Pyx_ReRaise(void); /*proto*/
...
@@ -4868,14 +4868,19 @@ static void __Pyx_ReRaise(void); /*proto*/
"""
,
"""
,
impl
=
"""
impl
=
"""
static void __Pyx_ReRaise(void) {
static void __Pyx_ReRaise(void) {
PyThreadState *tstate = PyThreadState_Get();
PyThreadState *tstate = PyThreadState_GET();
PyObject *type = tstate->exc_type;
PyObject* tmp_type = tstate->curexc_type;
PyObject *value = tstate->exc_value;
PyObject* tmp_value = tstate->curexc_value;
PyObject *tb = tstate->exc_traceback;
PyObject* tmp_tb = tstate->curexc_traceback;
Py_XINCREF(type);
tstate->curexc_type = tstate->exc_type;
Py_XINCREF(value);
tstate->curexc_value = tstate->exc_value;
Py_XINCREF(tb);
tstate->curexc_traceback = tstate->exc_traceback;
__Pyx_ErrRestore(type, value, tb);
tstate->exc_type = 0;
tstate->exc_value = 0;
tstate->exc_traceback = 0;
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
}
}
"""
)
"""
)
...
@@ -5271,6 +5276,16 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t
...
@@ -5271,6 +5276,16 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t
PyObject *tmp_type, *tmp_value, *tmp_tb;
PyObject *tmp_type, *tmp_value, *tmp_tb;
PyThreadState *tstate = PyThreadState_GET();
PyThreadState *tstate = PyThreadState_GET();
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
tstate->exc_type = 0;
tstate->exc_value = 0;
tstate->exc_traceback = 0;
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
tmp_type = tstate->curexc_type;
tmp_type = tstate->curexc_type;
tmp_value = tstate->curexc_value;
tmp_value = tstate->curexc_value;
tmp_tb = tstate->curexc_traceback;
tmp_tb = tstate->curexc_traceback;
...
...
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