summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_structseq.h9
-rw-r--r--Include/internal/pycore_typeobject.h1
-rw-r--r--Include/object.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/Include/internal/pycore_structseq.h b/Include/internal/pycore_structseq.h
index 0199c79..d10a921 100644
--- a/Include/internal/pycore_structseq.h
+++ b/Include/internal/pycore_structseq.h
@@ -15,11 +15,18 @@ PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType(
PyStructSequence_Desc *desc,
unsigned long tp_flags);
-PyAPI_FUNC(int) _PyStructSequence_InitType(
+PyAPI_FUNC(int) _PyStructSequence_InitBuiltinWithFlags(
PyTypeObject *type,
PyStructSequence_Desc *desc,
unsigned long tp_flags);
+static inline int
+_PyStructSequence_InitBuiltin(PyTypeObject *type,
+ PyStructSequence_Desc *desc)
+{
+ return _PyStructSequence_InitBuiltinWithFlags(type, desc, 0);
+}
+
extern void _PyStructSequence_FiniType(PyTypeObject *type);
#ifdef __cplusplus
diff --git a/Include/internal/pycore_typeobject.h b/Include/internal/pycore_typeobject.h
index c480a3a..46f3bf7 100644
--- a/Include/internal/pycore_typeobject.h
+++ b/Include/internal/pycore_typeobject.h
@@ -41,6 +41,7 @@ struct type_cache {
extern PyStatus _PyTypes_InitSlotDefs(void);
+extern int _PyStaticType_InitBuiltin(PyTypeObject *type);
extern void _PyStaticType_Dealloc(PyTypeObject *type);
diff --git a/Include/object.h b/Include/object.h
index a12b754..c00b9eb 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -352,6 +352,9 @@ given type object has a specified feature.
#ifndef Py_LIMITED_API
+/* Track types initialized using _PyStaticType_InitBuiltin(). */
+#define _Py_TPFLAGS_STATIC_BUILTIN (1 << 1)
+
/* Placement of dict (and values) pointers are managed by the VM, not by the type.
* The VM will automatically set tp_dictoffset. Should not be used for variable sized
* classes, such as classes that extend tuple.