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
3260ece5
Commit
3260ece5
authored
Oct 18, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix memory leak in new exception raising code
parent
4d8b1675
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+10
-12
No files found.
Cython/Compiler/Nodes.py
View file @
3260ece5
...
@@ -5061,7 +5061,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
...
@@ -5061,7 +5061,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
}
}
value = type;
value = type;
type = (PyObject*) Py_TYPE(value);
type = (PyObject*) Py_TYPE(value);
Py_INCREF(type);
} else if (!PyExceptionClass_Check(type)) {
} else if (!PyExceptionClass_Check(type)) {
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"raise: exception class must be a subclass of BaseException");
"raise: exception class must be a subclass of BaseException");
...
@@ -5072,19 +5071,18 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
...
@@ -5072,19 +5071,18 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
if (tb) {
if (tb) {
PyThreadState *tstate = PyThreadState_GET();
PyThreadState *tstate = PyThreadState_GET();
value = tstate->curexc_value;
PyObject* tmp_tb = tstate->curexc_traceback;
type = tstate->curexc_type;
if (tb != tmp_tb) {
Py_INCREF(type);
Py_XINCREF(value);
Py_INCREF(tb);
Py_INCREF(tb);
if (!value || value == Py_None) {
tstate->curexc_traceback = tb;
PyErr_NormalizeException(&type, &value, &tb);
value = tstate->curexc_value;
}
if (value && value != Py_None) {
if (value) {
PyException_SetTraceback(value, tb);
PyException_SetTraceback(value, tb);
__Pyx_ErrRestore(type, value, tb);
}
Py_XDECREF(tmp_tb);
}
}
}
}
bad:
bad:
return;
return;
}
}
...
...
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