mirror of
https://github.com/python/cpython
synced 2024-09-05 08:17:45 +00:00
bpo-43916: Move the _PyStructSequence_InitType function to the internal API (GH-25854)
This commit is contained in:
parent
440c025726
commit
c2931d31f8
|
@ -918,7 +918,6 @@ Py_tp_setattro
|
||||||
Py_tp_str
|
Py_tp_str
|
||||||
Py_tp_traverse
|
Py_tp_traverse
|
||||||
Py_uintptr_t
|
Py_uintptr_t
|
||||||
_PyStructSequence_InitType
|
|
||||||
_frame
|
_frame
|
||||||
_node
|
_node
|
||||||
allocfunc
|
allocfunc
|
||||||
|
|
21
Include/internal/pycore_structseq.h
Normal file
21
Include/internal/pycore_structseq.h
Normal file
|
@ -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 */
|
|
@ -27,10 +27,6 @@ PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
|
||||||
PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
|
PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
|
||||||
PyStructSequence_Desc *desc);
|
PyStructSequence_Desc *desc);
|
||||||
#endif
|
#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(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);
|
||||||
|
|
||||||
PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
|
PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
|
||||||
|
|
|
@ -1171,6 +1171,7 @@ PYTHON_HEADERS= \
|
||||||
$(srcdir)/Include/internal/pycore_pymem.h \
|
$(srcdir)/Include/internal/pycore_pymem.h \
|
||||||
$(srcdir)/Include/internal/pycore_pystate.h \
|
$(srcdir)/Include/internal/pycore_pystate.h \
|
||||||
$(srcdir)/Include/internal/pycore_runtime.h \
|
$(srcdir)/Include/internal/pycore_runtime.h \
|
||||||
|
$(srcdir)/Include/internal/pycore_structseq.h \
|
||||||
$(srcdir)/Include/internal/pycore_symtable.h \
|
$(srcdir)/Include/internal/pycore_symtable.h \
|
||||||
$(srcdir)/Include/internal/pycore_sysmodule.h \
|
$(srcdir)/Include/internal/pycore_sysmodule.h \
|
||||||
$(srcdir)/Include/internal/pycore_traceback.h \
|
$(srcdir)/Include/internal/pycore_traceback.h \
|
||||||
|
|
|
@ -2121,8 +2121,6 @@ function PyObject_GetAiter
|
||||||
added 3.10
|
added 3.10
|
||||||
data PyExc_EncodingWarning
|
data PyExc_EncodingWarning
|
||||||
added 3.10
|
added 3.10
|
||||||
function _PyStructSequence_InitType
|
|
||||||
added 3.10
|
|
||||||
|
|
||||||
# Support for Stable ABI in debug builds
|
# Support for Stable ABI in debug builds
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ static const char PyCursesVersion[] = "2.2";
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_long.h" // _PyLong_GetZero()
|
#include "pycore_long.h" // _PyLong_GetZero()
|
||||||
|
#include "pycore_structseq.h" // PyStructSequence_InitType()
|
||||||
|
|
||||||
#ifdef __hpux
|
#ifdef __hpux
|
||||||
#define STRICT_SYSV_CURSES
|
#define STRICT_SYSV_CURSES
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "pycore_tuple.h" // _PyTuple_FromArray()
|
#include "pycore_tuple.h" // _PyTuple_FromArray()
|
||||||
#include "pycore_object.h" // _PyObject_GC_TRACK()
|
#include "pycore_object.h" // _PyObject_GC_TRACK()
|
||||||
#include "structmember.h" // PyMemberDef
|
#include "structmember.h" // PyMemberDef
|
||||||
|
#include "pycore_structseq.h" // PyStructSequence_InitType()
|
||||||
|
|
||||||
static const char visible_length_key[] = "n_sequence_fields";
|
static const char visible_length_key[] = "n_sequence_fields";
|
||||||
static const char real_length_key[] = "n_fields";
|
static const char real_length_key[] = "n_fields";
|
||||||
|
|
|
@ -35,7 +35,6 @@ EXPORT_FUNC(_PyObject_GC_Resize)
|
||||||
EXPORT_FUNC(_PyObject_New)
|
EXPORT_FUNC(_PyObject_New)
|
||||||
EXPORT_FUNC(_PyObject_NewVar)
|
EXPORT_FUNC(_PyObject_NewVar)
|
||||||
EXPORT_FUNC(_PyState_AddModule)
|
EXPORT_FUNC(_PyState_AddModule)
|
||||||
EXPORT_FUNC(_PyStructSequence_InitType)
|
|
||||||
EXPORT_FUNC(_PyThreadState_Init)
|
EXPORT_FUNC(_PyThreadState_Init)
|
||||||
EXPORT_FUNC(_PyThreadState_Prealloc)
|
EXPORT_FUNC(_PyThreadState_Prealloc)
|
||||||
EXPORT_FUNC(_PyTrash_deposit_object)
|
EXPORT_FUNC(_PyTrash_deposit_object)
|
||||||
|
|
|
@ -209,6 +209,7 @@
|
||||||
<ClInclude Include="..\Include\internal\pycore_pymem.h" />
|
<ClInclude Include="..\Include\internal\pycore_pymem.h" />
|
||||||
<ClInclude Include="..\Include\internal\pycore_pystate.h" />
|
<ClInclude Include="..\Include\internal\pycore_pystate.h" />
|
||||||
<ClInclude Include="..\Include\internal\pycore_runtime.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_sysmodule.h" />
|
||||||
<ClInclude Include="..\Include\internal\pycore_symtable.h" />
|
<ClInclude Include="..\Include\internal\pycore_symtable.h" />
|
||||||
<ClInclude Include="..\Include\internal\pycore_traceback.h" />
|
<ClInclude Include="..\Include\internal\pycore_traceback.h" />
|
||||||
|
|
|
@ -24,6 +24,7 @@ Data members:
|
||||||
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
|
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
|
||||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||||
#include "pycore_tuple.h" // _PyTuple_FromArray()
|
#include "pycore_tuple.h" // _PyTuple_FromArray()
|
||||||
|
#include "pycore_structseq.h" // PyStructSequence_InitType()
|
||||||
|
|
||||||
#include "code.h"
|
#include "code.h"
|
||||||
#include "frameobject.h" // PyFrame_GetBack()
|
#include "frameobject.h" // PyFrame_GetBack()
|
||||||
|
|
Loading…
Reference in a new issue