Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Include/cpython/structseq.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef Py_CPYTHON_STRUCTSEQ_H
# error "this header file must not be included directly"
#endif

PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
PyStructSequence_Desc *desc);
PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
PyStructSequence_Desc *desc);

typedef PyTupleObject PyStructSequence;
#define PyStructSequence_SET_ITEM PyStructSequence_SetItem
#define PyStructSequence_GET_ITEM PyStructSequence_GetItem
12 changes: 3 additions & 9 deletions Include/structseq.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ typedef struct PyStructSequence_Desc {

PyAPI_DATA(const char * const) PyStructSequence_UnnamedField;

#ifndef Py_LIMITED_API
PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
PyStructSequence_Desc *desc);
PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
PyStructSequence_Desc *desc);
#endif
PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);

PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
Expand All @@ -35,9 +29,9 @@ PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*);
PyAPI_FUNC(PyObject*) PyStructSequence_GetItem(PyObject*, Py_ssize_t);

#ifndef Py_LIMITED_API
typedef PyTupleObject PyStructSequence;
#define PyStructSequence_SET_ITEM PyStructSequence_SetItem
#define PyStructSequence_GET_ITEM PyStructSequence_GetItem
# define Py_CPYTHON_STRUCTSEQ_H
# include "cpython/structseq.h"
# undef Py_CPYTHON_STRUCTSEQ_H
#endif

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/cpython/pythread.h \
$(srcdir)/Include/cpython/setobject.h \
$(srcdir)/Include/cpython/sliceobject.h \
$(srcdir)/Include/cpython/structseq.h \
$(srcdir)/Include/cpython/traceback.h \
$(srcdir)/Include/cpython/tracemalloc.h \
$(srcdir)/Include/cpython/tupleobject.h \
Expand Down
1 change: 1 addition & 0 deletions PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
<ClInclude Include="..\Include\cpython\pythread.h" />
<ClInclude Include="..\Include\cpython\setobject.h" />
<ClInclude Include="..\Include\cpython\sliceobject.h" />
<ClInclude Include="..\Include\cpython\structseq.h" />
<ClInclude Include="..\Include\cpython\traceback.h" />
<ClInclude Include="..\Include\cpython\tracemalloc.h" />
<ClInclude Include="..\Include\cpython\tupleobject.h" />
Expand Down
3 changes: 3 additions & 0 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@
<ClInclude Include="..\Include\cpython\pylifecycle.h">
<Filter>Include\cpython</Filter>
</ClInclude>
<ClInclude Include="..\Include\cpython\structseq.h">
<Filter>Include\cpython</Filter>
</ClInclude>
<ClInclude Include="..\Include\cpython\tupleobject.h">
<Filter>Include\cpython</Filter>
</ClInclude>
Expand Down
Loading