Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 885553e

Browse files
committed
Use PyThreadState_GET() macro.
1 parent 89ce454 commit 885553e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ eval_code2(co, globals, locals,
365365
register PyFrameObject *f; /* Current frame */
366366
register PyObject **fastlocals;
367367
PyObject *retval = NULL; /* Return value */
368-
PyThreadState *tstate = PyThreadState_Get();
368+
PyThreadState *tstate = PyThreadState_GET();
369369
unsigned char *first_instr;
370370
#ifdef LLTRACE
371371
int lltrace;

Python/errors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ PyErr_Restore(type, value, traceback)
5555
PyObject *value;
5656
PyObject *traceback;
5757
{
58-
PyThreadState *tstate = PyThreadState_Get();
58+
PyThreadState *tstate = PyThreadState_GET();
5959
PyObject *oldtype, *oldvalue, *oldtraceback;
6060

6161
if (traceback != NULL && !PyTraceBack_Check(traceback)) {

0 commit comments

Comments
 (0)