Skip to content

Commit 38a2153

Browse files
committed
Use void instead of a struct for PyThreadStateToken.
1 parent 767c894 commit 38a2153

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Include/pystate.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void);
127127
typedef struct PyInterpreterGuard PyInterpreterGuard;
128128
typedef struct PyInterpreterView PyInterpreterView;
129129

130-
// CPython detail: this struct is not defined anywhere; tokens are special
131-
// sentinels or PyThreadState's.
132-
typedef struct PyThreadStateToken PyThreadStateToken;
130+
typedef void PyThreadStateToken;
133131

134132
PyAPI_FUNC(PyInterpreterGuard *) PyInterpreterGuard_FromCurrent(void);
135133
PyAPI_FUNC(void) PyInterpreterGuard_Close(PyInterpreterGuard *guard);

0 commit comments

Comments
 (0)