#include "Python.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tupleobject.h"
#include "structmember.h"
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
-#include "pycore_pystate.h"
#include "structmember.h"
#include "pythread.h"
#include "_iomodule.h"
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "pycore_interp.h" // PyInterpreterState.fs_codec
#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "structmember.h"
#include "_iomodule.h"
#include "Python.h"
#include "pycore_pylifecycle.h"
#include "pycore_interp.h" // _PyInterpreterState.num_threads
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_Init()
#include "pythread.h"
#include <stddef.h> // offsetof()
#include "Python.h"
#include "pycore_context.h"
#include "pycore_initconfig.h"
+#include "pycore_interp.h" // PyInterpreterState.gc
#include "pycore_object.h"
#include "pycore_pyerrors.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
-#include "frameobject.h" /* for PyFrame_ClearFreeList */
+#include "frameobject.h" // PyFrame_ClearFreeList
#include "pydtrace.h"
-#include "pytime.h" /* for _PyTime_GetMonotonicClock() */
+#include "pytime.h" // _PyTime_GetMonotonicClock()
typedef struct _gc_runtime_state GCState;
/* Return the initial module search path. */
#include "Python.h"
-#include "pycore_initconfig.h"
-#include "osdefs.h"
#include "pycore_fileutils.h"
+#include "pycore_initconfig.h"
#include "pycore_pathconfig.h"
-#include "pycore_pystate.h"
+#include "osdefs.h"
#include <sys/types.h>
#include <string.h>
#include "pycore_pathconfig.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
/* Includes for exit_sigint() */
#include <stdio.h> /* perror() */
#include "pycore_ceval.h" /* _PyEval_ReInitThreads() */
#include "pycore_import.h" /* _PyImport_ReInitLock() */
-#include "pycore_pystate.h" /* _PyRuntime */
+#include "pycore_pystate.h" /* _PyInterpreterState_GET() */
#include "pythread.h"
#include "structmember.h"
#ifndef MS_WINDOWS
#include "pycore_call.h"
#include "pycore_ceval.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#ifndef MS_WINDOWS
#include "posixmodule.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include <ctype.h>
#include "structmember.h" /* we need the offsetof() macro from there */
#include "longintrepr.h"
#include "Python.h"
#include "pycore_call.h"
-#include "pycore_ceval.h" /* _PyEval_EvalFrame() */
+#include "pycore_ceval.h" // _PyEval_EvalFrame()
#include "pycore_object.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tupleobject.h"
#include "frameobject.h"
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
PyObject *
PyCell_New(PyObject *obj)
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "structmember.h"
#define TP_DESCR_GET(t) ((t)->tp_descr_get)
/* Descriptors -- a new, flexible way to describe attributes */
#include "Python.h"
-#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
+#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tupleobject.h"
#include "structmember.h" /* Why is this not included in Python.h? */
#define PyDict_MINSIZE 8
#include "Python.h"
+#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "dict-common.h"
-#include "stringlib/eq.h" /* to get unicode_eq() */
+#include "stringlib/eq.h" // unicode_eq()
/*[clinic input]
class dict "PyDictObject *" "&PyDict_Type"
#include "pycore_initconfig.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
#include "structmember.h"
#include "osdefs.h"
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "pycore_pystate.h"
+#include "pycore_runtime.h" // _PyRuntime
#if defined(HAVE_GETC_UNLOCKED) && !defined(_Py_MEMORY_SANITIZER)
/* clang MemorySanitizer doesn't yet understand getc_unlocked. */
#include "Python.h"
#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
#include "code.h"
#include "frameobject.h"
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
#include "pycore_tupleobject.h"
#include "code.h"
#include "structmember.h"
/* Generator object implementation */
#include "Python.h"
-#include "pycore_ceval.h" /* _PyEval_EvalFrame() */
+#include "pycore_ceval.h" // _PyEval_EvalFrame()
#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "frameobject.h"
#include "structmember.h"
#include "opcode.h"
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_interp.h" // _PyInterpreterState_LookUpID()
-#include "pycore_pystate.h"
#include "interpreteridobject.h"
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
typedef struct {
PyObject_HEAD
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_object.h"
-#include "pycore_pystate.h"
#include "pycore_tupleobject.h"
#include "pycore_accu.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_object.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
#include "pystrhex.h"
#include <stddef.h>
/* Method object implementation */
#include "Python.h"
-#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
+#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "structmember.h"
/* undefine macro trampoline to PyCFunction_NewEx */
#include "Python.h"
#include "pycore_interp.h" // PyInterpreterState.importlib
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "structmember.h"
static Py_ssize_t max_module_number;
/* Generic object operations; and implementation of None */
#include "Python.h"
-#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
+#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_context.h"
#include "pycore_initconfig.h"
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "frameobject.h"
#include "interpreteridobject.h"
#include "Python.h"
#include "pycore_object.h"
-#include "pycore_pystate.h"
#include "structmember.h"
#include "dict-common.h"
#include <stddef.h>
if (mutablemapping_update_arg(self, other) < 0) {
return NULL;
}
- Py_INCREF(self);
+ Py_INCREF(self);
return self;
}
*/
#include "Python.h"
-#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "structmember.h"
/* Object used as dummy key to fill deleted entries */
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_object.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
#include "structmember.h"
static PyObject *
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
-#include "pycore_object.h"
-#include "pycore_pystate.h"
#include "pycore_accu.h"
+#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
+#include "pycore_object.h"
/*[clinic input]
class tuple "PyTupleObject *" "&PyTuple_Type"
#include "pycore_initconfig.h"
#include "pycore_object.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "frameobject.h"
#include "structmember.h"
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "pycore_abstract.h" // _PyIndex_Check()
+#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_bytes_methods.h"
#include "pycore_fileutils.h"
#include "pycore_initconfig.h"
+#include "pycore_interp.h" // PyInterpreterState.fs_codec
#include "pycore_object.h"
#include "pycore_pathconfig.h"
#include "pycore_pylifecycle.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "ucnhash.h"
#include "stringlib/eq.h"
#include "Python.h"
#include "pycore_initconfig.h" /* PyStatus */
#include "pycore_pathconfig.h" /* _PyPathConfig */
-#include "pycore_pystate.h"
#include "osdefs.h"
#include <wchar.h>
/* List a node on a file */
#include "Python.h"
-#include "pycore_interp.h" // PyInterpreterState.parser
-#include "pycore_pystate.h" // _PyInterpreterState_GET
+#include "pycore_interp.h" // PyInterpreterState.parser
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "token.h"
#include "node.h"
*/
#include "Python.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#ifdef MS_WINDOWS
-#define WIN32_LEAN_AND_MEAN
-#include "windows.h"
+# define WIN32_LEAN_AND_MEAN
+# include "windows.h"
#endif /* MS_WINDOWS */
#undef NDEBUG
#include <Python.h>
-#include "pycore_initconfig.h" /* _PyConfig_InitCompatConfig() */
-#include "pycore_pystate.h" /* _PyRuntime */
+#include "pycore_initconfig.h" // _PyConfig_InitCompatConfig()
+#include "pycore_runtime.h" // _PyRuntime
#include <Python.h>
#include "pythread.h"
#include <inttypes.h>
#include "pycore_initconfig.h"
#include "pycore_interp.h" // PyInterpreterState.warnings
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "frameobject.h"
#include "clinic/_warnings.c.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_object.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tupleobject.h"
_Py_IDENTIFIER(__builtins__);
#define PY_LOCAL_AGGRESSIVE
#include "Python.h"
-#include "pycore_abstract.h" // _PyIndex_Check()
+#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_call.h"
#include "pycore_ceval.h"
#include "pycore_code.h"
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_sysmodule.h"
#include "pycore_tupleobject.h"
------------------------------------------------------------------------ */
#include "Python.h"
-#include "pycore_interp.h" // PyInterpreterState.codec_search_path
-#include "pycore_pystate.h"
+#include "pycore_interp.h" // PyInterpreterState.codec_search_path
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "ucnhash.h"
#include <ctype.h>
#include "Python.h"
#include "pycore_context.h"
+#include "pycore_gc.h" // _PyObject_GC_MAY_BE_TRACKED()
#include "pycore_hamt.h"
#include "pycore_object.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "structmember.h"
#include "Python.h"
#include "pycore_initconfig.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_sysmodule.h"
#include "pycore_traceback.h"
/* Python interpreter main program for frozen scripts */
#include "Python.h"
-#include "pycore_pystate.h"
+#include "pycore_runtime.h" // _PyRuntime_Initialize()
#include <locale.h>
#ifdef MS_WINDOWS
#include "Python.h"
#include "pycore_hamt.h"
-#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "structmember.h"
/*
#include "pycore_pyhash.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
-#include "pycore_interp.h" // _PyInterpreterState_ClearModules()
-#include "pycore_pystate.h"
+#include "pycore_interp.h" // _PyInterpreterState_ClearModules()
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_sysmodule.h"
#include "errcode.h"
#include "marshal.h"
#include "Python.h"
-#include "osdefs.h" /* DELIM */
+#include "osdefs.h" // DELIM
#include "pycore_fileutils.h"
#include "pycore_getopt.h"
#include "pycore_initconfig.h"
-#include "pycore_interp.h" // _PyInterpreterState.runtime
+#include "pycore_interp.h" // _PyInterpreterState.runtime
#include "pycore_pathconfig.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h" /* _PyRuntime */
-#include <locale.h> /* setlocale() */
+#include "pycore_pystate.h" // _PyThreadState_GET()
+#include <locale.h> // setlocale()
#ifdef HAVE_LANGINFO_H
-# include <langinfo.h> /* nl_langinfo(CODESET) */
+# include <langinfo.h> // nl_langinfo(CODESET)
#endif
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
-# include <windows.h> /* GetACP() */
+# include <windows.h> // GetACP()
# ifdef HAVE_IO_H
# include <io.h>
# endif
# ifdef HAVE_FCNTL_H
-# include <fcntl.h> /* O_BINARY */
+# include <fcntl.h> // O_BINARY
# endif
#endif
#include "pycore_fileutils.h"
#include "pycore_pathconfig.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
#include <wchar.h>
+#ifdef MS_WINDOWS
+# include <windows.h> // GetFullPathNameW(), MAX_PATH
+#endif
#ifdef __cplusplus
extern "C" {
#include "pycore_getopt.h"
#include "pycore_initconfig.h"
#include "pycore_pymem.h" // _PyMem_GetAllocatorName()
-#include "pycore_pystate.h" // _PyRuntime_Initialize()
+#include "pycore_runtime.h" // _PyRuntime_Initialize()
#include <locale.h> // setlocale()
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "pycore_ceval.h"
#include "pycore_context.h"
-#include "pycore_import.h" /* _PyImport_FindBuiltin */
+#include "pycore_import.h" // _PyImport_Cleanup()
#include "pycore_initconfig.h"
#include "pycore_fileutils.h"
#include "pycore_hamt.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_sysmodule.h"
#include "pycore_traceback.h"
#include "grammar.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_sysmodule.h"
/* --------------------------------------------------------------------------
#include "Python-ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
+#include "pycore_interp.h" // PyInterpreterState.importlib
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_sysmodule.h"
#include "grammar.h"
#include "node.h"
#include "Python.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "symtable.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
#include "structmember.h"
#include "code.h"
#include "frameobject.h"
#include "pycore_ceval.h" // _Py_RecursionLimitLowerWaterMark()
-#include "pycore_pystate.h" // _PyThreadState_GET()
-#include "pycore_tupleobject.h"
#include "pycore_initconfig.h"
#include "pycore_pathconfig.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tupleobject.h"
#include "pythread.h"
#include "pydtrace.h"
Stuff shared by all thread_*.h files is collected here. */
#include "Python.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro
/* Traceback implementation */
#include "Python.h"
-#include "pycore_pystate.h"
#include "code.h"
#include "frameobject.h"