[Python-checkins] r72514 - in python/branches/py3k: Include/Python.h Include/bltinmodule.h Makefile.pre.in Objects/object.c Python/bltinmodule.c
benjamin.peterson
python-checkins at python.org
Sat May 9 20:10:53 CEST 2009
Author: benjamin.peterson
Date: Sat May 9 20:10:51 2009
New Revision: 72514
Log:
these builtins have to initialized
Added:
python/branches/py3k/Include/bltinmodule.h (contents, props changed)
Modified:
python/branches/py3k/Include/Python.h
python/branches/py3k/Makefile.pre.in
python/branches/py3k/Objects/object.c
python/branches/py3k/Python/bltinmodule.c
Modified: python/branches/py3k/Include/Python.h
==============================================================================
--- python/branches/py3k/Include/Python.h (original)
+++ python/branches/py3k/Include/Python.h Sat May 9 20:10:51 2009
@@ -113,6 +113,7 @@
#include "import.h"
#include "abstract.h"
+#include "bltinmodule.h"
#include "compile.h"
#include "eval.h"
Added: python/branches/py3k/Include/bltinmodule.h
==============================================================================
--- (empty file)
+++ python/branches/py3k/Include/bltinmodule.h Sat May 9 20:10:51 2009
@@ -0,0 +1,14 @@
+#ifndef Py_BLTINMODULE_H
+#define Py_BLTINMODULE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+PyAPI_DATA(PyTypeObject) PyFilter_Type;
+PyAPI_DATA(PyTypeObject) PyMap_Type;
+PyAPI_DATA(PyTypeObject) PyZip_Type;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_BLTINMODULE_H */
Modified: python/branches/py3k/Makefile.pre.in
==============================================================================
--- python/branches/py3k/Makefile.pre.in (original)
+++ python/branches/py3k/Makefile.pre.in Sat May 9 20:10:51 2009
@@ -612,6 +612,7 @@
Include/abstract.h \
Include/asdl.h \
Include/ast.h \
+ Include/bltinmodule.h \
Include/bitset.h \
Include/boolobject.h \
Include/bytes_methods.h \
Modified: python/branches/py3k/Objects/object.c
==============================================================================
--- python/branches/py3k/Objects/object.c (original)
+++ python/branches/py3k/Objects/object.c Sat May 9 20:10:51 2009
@@ -1595,6 +1595,15 @@
if (PyType_Ready(&PyMemberDescr_Type) < 0)
Py_FatalError("Can't initialize member descriptor type");
+
+ if (PyType_Ready(&PyFilter_Type) < 0)
+ Py_FatalError("Can't initialize filter type");
+
+ if (PyType_Ready(&PyMap_Type) < 0)
+ Py_FatalError("Can't initialize map type");
+
+ if (PyType_Ready(&PyZip_Type) < 0)
+ Py_FatalError("Can't initialize zip type");
}
Modified: python/branches/py3k/Python/bltinmodule.c
==============================================================================
--- python/branches/py3k/Python/bltinmodule.c (original)
+++ python/branches/py3k/Python/bltinmodule.c Sat May 9 20:10:51 2009
@@ -317,8 +317,6 @@
PyObject *it;
} filterobject;
-PyTypeObject PyFilter_Type;
-
static PyObject *
filter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
@@ -913,8 +911,6 @@
PyObject *func;
} mapobject;
-PyTypeObject PyMap_Type;
-
static PyObject *
map_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
@@ -2031,8 +2027,6 @@
PyObject *result;
} zipobject;
-PyTypeObject PyZip_Type;
-
static PyObject *
zip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
More information about the Python-checkins
mailing list