mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)
This commit is contained in:
parent
e1945307d3
commit
e5014be049
56 changed files with 78 additions and 86 deletions
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "pycore_pystate.h"
|
||||
|
||||
PyObject *
|
||||
PyCell_New(PyObject *obj)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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? */
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "pycore_pystate.h"
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue