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

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

View file

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

View file

@ -3,7 +3,6 @@
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
PyObject *
PyCell_New(PyObject *obj)

View file

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

View file

@ -1,9 +1,9 @@
/* 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? */

View file

@ -111,10 +111,11 @@ converting the dict to the combined table.
#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"

View file

@ -9,7 +9,6 @@
#include "pycore_initconfig.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "osdefs.h"

View file

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

View file

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

View file

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

View file

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

View file

@ -3,7 +3,6 @@
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_interp.h" // _PyInterpreterState_LookUpID()
#include "pycore_pystate.h"
#include "interpreteridobject.h"

View file

@ -3,7 +3,6 @@
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
typedef struct {
PyObject_HEAD

View file

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

View file

@ -14,7 +14,6 @@
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "pystrhex.h"
#include <stddef.h>

View file

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

View file

@ -3,7 +3,7 @@
#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;

View file

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

View file

@ -466,7 +466,6 @@ later:
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "dict-common.h"
#include <stddef.h>
@ -890,7 +889,7 @@ odict_inplace_or(PyObject *self, PyObject *other)
if (mutablemapping_update_arg(self, other) < 0) {
return NULL;
}
Py_INCREF(self);
Py_INCREF(self);
return self;
}

View file

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

View file

@ -17,7 +17,6 @@ this type and there is exactly one in existence.
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
static PyObject *

View file

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

View file

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

View file

@ -40,14 +40,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#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"