Commit 213986a7 authored by Stefan Behnel's avatar Stefan Behnel

fix tracing again

parent 920ab180
...@@ -112,13 +112,14 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, ...@@ -112,13 +112,14 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
const char *srcfile, const char *srcfile,
int firstlineno) { int firstlineno) {
int retval; int retval;
PyThreadState* tstate = PyThreadState_GET();
if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
if (*code == NULL) { if (*code == NULL) {
*code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
if (*code == NULL) return 0; if (*code == NULL) return 0;
} }
*frame = PyFrame_New( *frame = PyFrame_New(
PyThreadState_GET(), /*PyThreadState *tstate*/ tstate, /*PyThreadState *tstate*/
*code, /*PyCodeObject *code*/ *code, /*PyCodeObject *code*/
$moddict_cname, /*PyObject *globals*/ $moddict_cname, /*PyObject *globals*/
0 /*PyObject *locals*/ 0 /*PyObject *locals*/
...@@ -131,7 +132,7 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, ...@@ -131,7 +132,7 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
} }
#if PY_VERSION_HEX < 0x030400B1 #if PY_VERSION_HEX < 0x030400B1
} else { } else {
(*frame)->f_tstate = PyThreadState_GET(); (*frame)->f_tstate = tstate;
#endif #endif
} }
(*frame)->f_lineno = firstlineno; (*frame)->f_lineno = firstlineno;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment