File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,14 @@ PyEventLoop PyEventLoop::_getLoopOnThread(PyThreadState *tstate) {
155
155
// See https://github.com/python/cpython/blob/v3.13.0rc1/Include/internal/pycore_tstate.h#L17-L24
156
156
using PyThreadStateHolder = struct { // _PyThreadStateImpl
157
157
PyThreadState base;
158
- PyObject *asyncio_running_loop; // we only need the first field of `_PyThreadStateImpl`
158
+ #if PY_VERSION_HEX >= 0x030e0000 // Python version is greater than 3.14
159
+ // the struct is changed with more additional fields, see https://github.com/python/cpython/blob/v3.14.0rc3/Include/internal/pycore_tstate.h#L24-L40
160
+ Py_ssize_t refcount;
161
+ uintptr_t c_stack_top;
162
+ uintptr_t c_stack_soft_limit;
163
+ uintptr_t c_stack_hard_limit;
164
+ #endif
165
+ PyObject *asyncio_running_loop; // we only need the first few fields of `_PyThreadStateImpl`
159
166
};
160
167
161
168
// Modified from https://github.com/python/cpython/blob/v3.13.0rc1/Modules/_asynciomodule.c#L3205-L3210
You can’t perform that action at this time.
0 commit comments