File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 113113#include "import.h"
114114
115115#include "abstract.h"
116+ #include "bltinmodule.h"
116117
117118#include "compile.h"
118119#include "eval.h"
Original file line number Diff line number Diff line change 1+ #ifndef Py_BLTINMODULE_H
2+ #define Py_BLTINMODULE_H
3+ #ifdef __cplusplus
4+ extern "C" {
5+ #endif
6+
7+ PyAPI_DATA (PyTypeObject ) PyFilter_Type ;
8+ PyAPI_DATA (PyTypeObject ) PyMap_Type ;
9+ PyAPI_DATA (PyTypeObject ) PyZip_Type ;
10+
11+ #ifdef __cplusplus
12+ }
13+ #endif
14+ #endif /* !Py_BLTINMODULE_H */
Original file line number Diff line number Diff line change @@ -612,6 +612,7 @@ PYTHON_HEADERS= \
612612 Include/abstract.h \
613613 Include/asdl.h \
614614 Include/ast.h \
615+ Include/bltinmodule.h \
615616 Include/bitset.h \
616617 Include/boolobject.h \
617618 Include/bytes_methods.h \
Original file line number Diff line number Diff line change @@ -1595,6 +1595,15 @@ _Py_ReadyTypes(void)
15951595
15961596 if (PyType_Ready (& PyMemberDescr_Type ) < 0 )
15971597 Py_FatalError ("Can't initialize member descriptor type" );
1598+
1599+ if (PyType_Ready (& PyFilter_Type ) < 0 )
1600+ Py_FatalError ("Can't initialize filter type" );
1601+
1602+ if (PyType_Ready (& PyMap_Type ) < 0 )
1603+ Py_FatalError ("Can't initialize map type" );
1604+
1605+ if (PyType_Ready (& PyZip_Type ) < 0 )
1606+ Py_FatalError ("Can't initialize zip type" );
15981607}
15991608
16001609
Original file line number Diff line number Diff line change @@ -317,8 +317,6 @@ typedef struct {
317317 PyObject * it ;
318318} filterobject ;
319319
320- PyTypeObject PyFilter_Type ;
321-
322320static PyObject *
323321filter_new (PyTypeObject * type , PyObject * args , PyObject * kwds )
324322{
@@ -913,8 +911,6 @@ typedef struct {
913911 PyObject * func ;
914912} mapobject ;
915913
916- PyTypeObject PyMap_Type ;
917-
918914static PyObject *
919915map_new (PyTypeObject * type , PyObject * args , PyObject * kwds )
920916{
@@ -2031,8 +2027,6 @@ typedef struct {
20312027 PyObject * result ;
20322028} zipobject ;
20332029
2034- PyTypeObject PyZip_Type ;
2035-
20362030static PyObject *
20372031zip_new (PyTypeObject * type , PyObject * args , PyObject * kwds )
20382032{
You can’t perform that action at this time.
0 commit comments