bpo-35081: Add Include/internal/pycore_object.h (GH-10640)
Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from
Include/objimpl.h to Include/internal/pycore_object.h.
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 561b06c..1442653 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2,6 +2,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index fac12f5..bed75ee 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -3,6 +3,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
diff --git a/Objects/call.c b/Objects/call.c
index 7c452b9..ce346c2 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -1,4 +1,5 @@
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "frameobject.h"
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index 7605bcf..6b7136c 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -1,6 +1,7 @@
/* Cell object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 79b0562..6d1f05c 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -1,6 +1,7 @@
/* Class object implementation (dead now except for methods) */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index ca814bf..dd3c501 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1,6 +1,7 @@
/* Descriptors -- a new, flexible way to describe attributes */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "structmember.h" /* Why is this not included in Python.h? */
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index df92bfd..24561dd 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -111,6 +111,7 @@
#define PyDict_MINSIZE 8
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "dict-common.h"
#include "stringlib/eq.h" /* to get unicode_eq() */
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 5ab1271..cecbf97 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -6,6 +6,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 70cf580..b1a83d8 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1,6 +1,7 @@
/* Frame object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "code.h"
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index a8e11a9..982df54 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -2,6 +2,7 @@
/* Function object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "code.h"
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 716bd6d..3279a09 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1,6 +1,7 @@
/* Generator object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "frameobject.h"
#include "structmember.h"
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index 64bf923..ada1bdc 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -1,6 +1,7 @@
/* Iterator objects */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 44160ab..6da8391 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1,6 +1,7 @@
/* List object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "pycore_accu.h"
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index 060ae4d..0f528ee 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1,6 +1,7 @@
/* Memoryview object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "pystrhex.h"
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index cfea8cf..23325e2 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -2,6 +2,7 @@
/* Method object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
index 13bc972..bdd6108 100644
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -465,6 +465,7 @@
*/
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "dict-common.h"
diff --git a/Objects/setobject.c b/Objects/setobject.c
index b11cb3a..c2a1467 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -32,6 +32,7 @@
*/
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "structmember.h"
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 1f79faa..c60483e 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -14,6 +14,7 @@
*/
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index e7ba09d..83c63e0 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -2,6 +2,7 @@
/* Tuple object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "pycore_accu.h"
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 4d599bf..2345b7c 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1,6 +1,7 @@
/* Type object implementation */
#include "Python.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "frameobject.h"
#include "structmember.h"
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 04ca5f3..d22b277 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -41,6 +41,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_fileutils.h"
+#include "pycore_object.h"
#include "pycore_pystate.h"
#include "ucnhash.h"
#include "bytes_methods.h"