@@ -338,4 +338,82 @@ typedef struct _is
338338 struct _import_state imports;
339339} PyInterpreterState;
340340} // namespace Python3_13
341+
342+ namespace Python3_14 {
343+
344+ struct _pythreadstate ;
345+
346+ typedef struct
347+ {
348+ Python3_13::PyMutex mutex;
349+ unsigned long long thread;
350+ size_t level;
351+ } _PyRecursiveMutex;
352+
353+ struct _import_state
354+ {
355+ PyObject* modules;
356+ PyObject* modules_by_index;
357+ PyObject* importlib;
358+ int override_frozen_modules;
359+ int override_multi_interp_extensions_check;
360+ PyObject* import_func;
361+ _PyRecursiveMutex lock;
362+ /* diagnostic info in PyImport_ImportModuleLevelObject() */
363+ struct
364+ {
365+ int import_level;
366+ int64_t accumulated;
367+ int header;
368+ } find_and_load;
369+ };
370+
371+ struct _gil_runtime_state
372+ {
373+ unsigned long interval;
374+ struct _pythreadstate * last_holder;
375+ int locked;
376+ unsigned long switch_number;
377+ pthread_cond_t cond;
378+ pthread_cond_t mutex;
379+ #ifdef FORCE_SWITCHING
380+ pthread_cond_t switch_cond;
381+ pthread_cond_t switch_mutex;
382+ #endif
383+ };
384+
385+ typedef struct _is
386+ {
387+ struct _ceval_state ceval;
388+ void * _malloced;
389+ struct _is * next;
390+ int64_t id;
391+ Py_ssize_t id_refcount;
392+ int requires_idref;
393+ long _whence;
394+ int _initialized;
395+ int _ready;
396+ int finalizing;
397+ uintptr_t last_restart_version;
398+ struct pythreads
399+ {
400+ uint64_t next_unique_id;
401+ struct _pythreadstate * head;
402+ struct _pythreadstate * preallocated;
403+ struct _pythreadstate * main;
404+ Py_ssize_t count;
405+ size_t stacksize;
406+ } threads;
407+ void * runtime;
408+ struct _pythreadstate * _finalizing;
409+ unsigned long _finalizing_id;
410+ struct _gc_runtime_state gc;
411+ PyObject* sysdict;
412+ PyObject* builtins;
413+ struct _import_state imports;
414+ struct _gil_runtime_state _gil;
415+ } PyInterpreterState;
416+
417+ } // namespace Python3_14
418+
341419} // namespace pystack
0 commit comments