]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43916: Move the _PyStructSequence_InitType function to the internal API (GH-25854)
authorPablo Galindo <Pablogsal@gmail.com>
Mon, 3 May 2021 14:50:24 +0000 (15:50 +0100)
committerGitHub <noreply@github.com>
Mon, 3 May 2021 14:50:24 +0000 (15:50 +0100)
Doc/data/stable_abi.dat
Include/internal/pycore_structseq.h [new file with mode: 0644]
Include/structseq.h
Makefile.pre.in
Misc/stable_abi.txt
Modules/_cursesmodule.c
Objects/structseq.c
PC/python3dll.c
PCbuild/pythoncore.vcxproj
Python/sysmodule.c

index b21374a05cb6a5cbad56a8c0a626868cc5a062af..833228f7fd755deecf7735f9b6acb279cbf6e2a6 100644 (file)
@@ -918,7 +918,6 @@ Py_tp_setattro
 Py_tp_str
 Py_tp_traverse
 Py_uintptr_t
-_PyStructSequence_InitType
 _frame
 _node
 allocfunc
diff --git a/Include/internal/pycore_structseq.h b/Include/internal/pycore_structseq.h
new file mode 100644 (file)
index 0000000..84c8d47
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef Py_INTERNAL_STRUCTSEQ_H
+#define Py_INTERNAL_STRUCTSEQ_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef Py_BUILD_CORE
+#  error "this header requires Py_BUILD_CORE define"
+#endif
+
+
+PyAPI_FUNC(int) _PyStructSequence_InitType(
+    PyTypeObject *type,
+    PyStructSequence_Desc *desc,
+    unsigned long tp_flags);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTERNAL_STRUCTSEQ_H */
index 890e03130b4edbfa6bc166805849460d4e642e1a..8f51c89163a4e17ef188001de6d9fa53d70b97ad 100644 (file)
@@ -27,10 +27,6 @@ PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
 PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
                                            PyStructSequence_Desc *desc);
 #endif
-PyAPI_FUNC(int) _PyStructSequence_InitType(
-    PyTypeObject *type,
-    PyStructSequence_Desc *desc,
-    unsigned long tp_flags);
 PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);
 
 PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
index 0836655e15adb41ed032d77f9b05833e74da2284..92cc48657a2af010d69731cc56179caaf56198ca 100644 (file)
@@ -1171,6 +1171,7 @@ PYTHON_HEADERS= \
                $(srcdir)/Include/internal/pycore_pymem.h \
                $(srcdir)/Include/internal/pycore_pystate.h \
                $(srcdir)/Include/internal/pycore_runtime.h \
+               $(srcdir)/Include/internal/pycore_structseq.h \
                $(srcdir)/Include/internal/pycore_symtable.h \
                $(srcdir)/Include/internal/pycore_sysmodule.h \
                $(srcdir)/Include/internal/pycore_traceback.h \
index d79746e0a4ec046f23f05680f6814a7a700e5b5e..2a802bd5f4b831da3009b0e4d06891b3f9b664ce 100644 (file)
@@ -2121,8 +2121,6 @@ function PyObject_GetAiter
     added 3.10
 data PyExc_EncodingWarning
     added 3.10
-function _PyStructSequence_InitType
-    added 3.10
 
 # Support for Stable ABI in debug builds
 
index bcf9ad19386b25867e254b8a69888aab4d3115c1..b6b7ca458b454af62137cd38341103460b6878b0 100644 (file)
@@ -104,7 +104,7 @@ static const char PyCursesVersion[] = "2.2";
 
 #include "Python.h"
 #include "pycore_long.h"          // _PyLong_GetZero()
-
+#include "pycore_structseq.h"     // PyStructSequence_InitType()
 
 #ifdef __hpux
 #define STRICT_SYSV_CURSES
index bf59f47fcf073b87d0e61392616e5b85ae1fd5ef..73795b677b404f13de8c92f8eb48b78ba289e368 100644 (file)
@@ -11,6 +11,7 @@
 #include "pycore_tuple.h"         // _PyTuple_FromArray()
 #include "pycore_object.h"        // _PyObject_GC_TRACK()
 #include "structmember.h"         // PyMemberDef
+#include "pycore_structseq.h"     // PyStructSequence_InitType()
 
 static const char visible_length_key[] = "n_sequence_fields";
 static const char real_length_key[] = "n_fields";
index 30868c1864622e96baff20dd7348558993b90080..574d4dcad9f75b0b7b9981b26e383e7c12fb7567 100755 (executable)
@@ -35,7 +35,6 @@ EXPORT_FUNC(_PyObject_GC_Resize)
 EXPORT_FUNC(_PyObject_New)
 EXPORT_FUNC(_PyObject_NewVar)
 EXPORT_FUNC(_PyState_AddModule)
-EXPORT_FUNC(_PyStructSequence_InitType)
 EXPORT_FUNC(_PyThreadState_Init)
 EXPORT_FUNC(_PyThreadState_Prealloc)
 EXPORT_FUNC(_PyTrash_deposit_object)
index 429d437c5ebc2073a55b5bec2d9e921d9ec8b763..0382977d6c367a416df2e038f285b9af8919fa58 100644 (file)
     <ClInclude Include="..\Include\internal\pycore_pymem.h" />
     <ClInclude Include="..\Include\internal\pycore_pystate.h" />
     <ClInclude Include="..\Include\internal\pycore_runtime.h" />
+    <ClInclude Include="..\Include\internal\pycore_structseq.h" />
     <ClInclude Include="..\Include\internal\pycore_sysmodule.h" />
     <ClInclude Include="..\Include\internal\pycore_symtable.h" />
     <ClInclude Include="..\Include\internal\pycore_traceback.h" />
index 2190bbf37fdae1af07098b5a76bd715f780aa5ab..ac49f7867a5cb3b2d833fbaab11d4a9b19d475cd 100644 (file)
@@ -24,6 +24,7 @@ Data members:
 #include "pycore_pymem.h"         // _PyMem_SetDefaultAllocator()
 #include "pycore_pystate.h"       // _PyThreadState_GET()
 #include "pycore_tuple.h"         // _PyTuple_FromArray()
+#include "pycore_structseq.h"     // PyStructSequence_InitType()
 
 #include "code.h"
 #include "frameobject.h"          // PyFrame_GetBack()