bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)

This commit is contained in:
Victor Stinner 2020-04-14 17:52:15 +02:00 committed by GitHub
parent e1945307d3
commit e5014be049
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 78 additions and 86 deletions

View file

@ -2,7 +2,7 @@
#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"

View file

@ -6,7 +6,7 @@
#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__);

View file

@ -10,7 +10,7 @@
#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"
@ -18,7 +18,7 @@
#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"

View file

@ -9,8 +9,8 @@ Copyright (c) Corporation for National Research Initiatives.
------------------------------------------------------------------------ */
#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>

View file

@ -1,10 +1,11 @@
#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"

View file

@ -4,7 +4,7 @@
#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"

View file

@ -2,7 +2,7 @@
/* 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

View file

@ -1,8 +1,7 @@
#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"
/*

View file

@ -9,8 +9,8 @@
#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"

View file

@ -1,25 +1,25 @@
#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

View file

@ -6,8 +6,10 @@
#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" {

View file

@ -2,7 +2,7 @@
#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()

View file

@ -6,7 +6,7 @@
#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"
@ -15,7 +15,7 @@
#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"

View file

@ -7,7 +7,7 @@
#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"
/* --------------------------------------------------------------------------

View file

@ -12,10 +12,11 @@
#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"

View file

@ -1,5 +1,5 @@
#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"

View file

@ -18,13 +18,12 @@ Data members:
#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"

View file

@ -6,7 +6,7 @@
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

View file

@ -2,7 +2,6 @@
/* Traceback implementation */
#include "Python.h"
#include "pycore_pystate.h"
#include "code.h"
#include "frameobject.h"