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
d485d418
Commit
d485d418
authored
Mar 03, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work-around to fix ticket #228 at least work in Py2.x, while still preventing crashes in Py3
parent
a9358680
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+16
-9
No files found.
Cython/Compiler/Nodes.py
View file @
d485d418
...
@@ -5425,15 +5425,22 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t
...
@@ -5425,15 +5425,22 @@ 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;
#if PY_MAJOR_VERSION >= 3
tmp_value = tstate->exc_value;
/* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
tmp_tb = tstate->exc_traceback;
if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
tstate->exc_type = 0;
tmp_type = tstate->exc_type;
tstate->exc_value = 0;
tmp_value = tstate->exc_value;
tstate->exc_traceback = 0;
tmp_tb = tstate->exc_traceback;
Py_XDECREF(tmp_type);
PyErr_NormalizeException(&type, &value, &tb);
Py_XDECREF(tmp_value);
PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
Py_XDECREF(tmp_tb);
tstate->exc_type = 0;
tstate->exc_value = 0;
tstate->exc_traceback = 0;
PyException_SetContext(value, tmp_value);
Py_DECREF(tmp_type);
Py_XDECREF(tmp_tb);
}
#endif
tmp_type = tstate->curexc_type;
tmp_type = tstate->curexc_type;
tmp_value = tstate->curexc_value;
tmp_value = tstate->curexc_value;
...
...
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