Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Modules/_lsprof.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -671,7 +671,7 @@ profiler_enable(ProfilerObject *self, PyObject *args, PyObject *kwds)
return NULL;
}

PyThreadState *tstate = PyThreadState_GET();
PyThreadState *tstate = PyThreadState_Get();
if (_PyEval_SetProfile(tstate, profiler_callback, (PyObject*)self) < 0){
return NULL;
}
Expand DownExpand Up@@ -705,7 +705,7 @@ Stop collecting profiling information.\n\
static PyObject*
profiler_disable(ProfilerObject *self, PyObject* noarg)
{
PyThreadState *tstate = PyThreadState_GET();
PyThreadState *tstate = PyThreadState_Get();
if (_PyEval_SetProfile(tstate, NULL, NULL) < 0){
return NULL;
}
Expand DownExpand Up@@ -735,7 +735,7 @@ static void
profiler_dealloc(ProfilerObject *op)
{
if (op->flags & POF_ENABLED){
PyThreadState *tstate = PyThreadState_GET();
PyThreadState *tstate = PyThreadState_Get();
if (_PyEval_SetProfile(tstate, NULL, NULL) < 0){
PyErr_WriteUnraisable((PyObject *)op);
}
Expand Down