Skip to content

Commit b9d3bc8

Browse files
committed
Rename WHENCE_GILSTATE to WHENCE_C_API.
1 parent a767e43 commit b9d3bc8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Include/cpython/pystate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct _ts {
105105
# define _PyThreadState_WHENCE_INIT 1
106106
# define _PyThreadState_WHENCE_FINI 2
107107
# define _PyThreadState_WHENCE_THREADING 3
108-
# define _PyThreadState_WHENCE_GILSTATE 4
108+
# define _PyThreadState_WHENCE_C_API 4
109109
# define _PyThreadState_WHENCE_EXEC 5
110110
# define _PyThreadState_WHENCE_THREADING_DAEMON 6
111111
#endif

Python/pystate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,7 +2930,7 @@ PyGILState_Ensure(void)
29302930
PyThread_hang_thread();
29312931
}
29322932
tcur = new_threadstate(guard->interp,
2933-
_PyThreadState_WHENCE_GILSTATE);
2933+
_PyThreadState_WHENCE_C_API);
29342934
if (tcur == NULL) {
29352935
Py_FatalError("Couldn't create thread-state for new thread");
29362936
}
@@ -3481,7 +3481,7 @@ PyThreadState_Ensure(PyInterpreterGuard *guard)
34813481
}
34823482

34833483
PyThreadState *fresh_tstate = _PyThreadState_NewBound(interp,
3484-
_PyThreadState_WHENCE_GILSTATE);
3484+
_PyThreadState_WHENCE_C_API);
34853485
if (fresh_tstate == NULL) {
34863486
return NULL;
34873487
}

0 commit comments

Comments
 (0)