summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-20 02:09:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-04-20 02:09:13 (GMT)
commitc485361f6129fbdc5f0258162b288977b7194084 (patch)
tree1784ce30a95bf06f0c4301dadfd5c1be7c4631ea /Objects
parent7b5adc066a1fe3ffa61e4956944696f6352ac421 (diff)
downloadcpython-c485361f6129fbdc5f0258162b288977b7194084.zip
cpython-c485361f6129fbdc5f0258162b288977b7194084.tar.gz
cpython-c485361f6129fbdc5f0258162b288977b7194084.tar.bz2
Merged revisions 71734,71738-71739 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71734 | benjamin.peterson | 2009-04-18 17:15:26 -0500 (Sat, 18 Apr 2009) | 1 line many more types to initialize (I had to expose some of them) ........ r71738 | benjamin.peterson | 2009-04-18 21:32:42 -0500 (Sat, 18 Apr 2009) | 1 line initialize weakref some weakref types ........ r71739 | benjamin.peterson | 2009-04-18 21:40:43 -0500 (Sat, 18 Apr 2009) | 1 line make errors consistent ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c8
-rw-r--r--Objects/object.c54
-rw-r--r--Objects/sliceobject.c2
3 files changed, 56 insertions, 8 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index fcc174e..536e5a8 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -456,7 +456,7 @@ static PyTypeObject PyClassMethodDescr_Type = {
0, /* tp_descr_set */
};
-static PyTypeObject PyMemberDescr_Type = {
+PyTypeObject PyMemberDescr_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"member_descriptor",
sizeof(PyMemberDescrObject),
@@ -493,7 +493,7 @@ static PyTypeObject PyMemberDescr_Type = {
(descrsetfunc)member_set, /* tp_descr_set */
};
-static PyTypeObject PyGetSetDescr_Type = {
+PyTypeObject PyGetSetDescr_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"getset_descriptor",
sizeof(PyGetSetDescrObject),
@@ -819,7 +819,7 @@ proxy_richcompare(proxyobject *v, PyObject *w, int op)
return PyObject_RichCompare(v->dict, w, op);
}
-static PyTypeObject proxytype = {
+PyTypeObject PyDictProxy_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"dictproxy", /* tp_name */
sizeof(proxyobject), /* tp_basicsize */
@@ -862,7 +862,7 @@ PyDictProxy_New(PyObject *dict)
{
proxyobject *pp;
- pp = PyObject_GC_New(proxyobject, &proxytype);
+ pp = PyObject_GC_New(proxyobject, &PyDictProxy_Type);
if (pp != NULL) {
Py_INCREF(dict);
pp->dict = dict;
diff --git a/Objects/object.c b/Objects/object.c
index 898aa65..1d98efe 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2,6 +2,7 @@
/* Generic object operations; and implementation of None (NoObject) */
#include "Python.h"
+#include "frameobject.h"
#ifdef __cplusplus
extern "C" {
@@ -2027,6 +2028,12 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&_PyWeakref_RefType) < 0)
Py_FatalError("Can't initialize weakref type");
+ if (PyType_Ready(&_PyWeakref_CallableProxyType) < 0)
+ Py_FatalError("Can't initialize callable weakref proxy type");
+
+ if (PyType_Ready(&_PyWeakref_ProxyType) < 0)
+ Py_FatalError("Can't initialize weakref proxy type");
+
if (PyType_Ready(&PyBool_Type) < 0)
Py_FatalError("Can't initialize bool type");
@@ -2034,10 +2041,10 @@ _Py_ReadyTypes(void)
Py_FatalError("Can't initialize str type");
if (PyType_Ready(&PyByteArray_Type) < 0)
- Py_FatalError("Can't initialize bytearray");
+ Py_FatalError("Can't initialize bytearray type");
if (PyType_Ready(&PyList_Type) < 0)
- Py_FatalError("Can't initialize list");
+ Py_FatalError("Can't initialize list type");
if (PyType_Ready(&PyNone_Type) < 0)
Py_FatalError("Can't initialize None type");
@@ -2072,8 +2079,10 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&PyStaticMethod_Type) < 0)
Py_FatalError("Can't initialize static method type");
+#ifndef WITHOUT_COMPLEX
if (PyType_Ready(&PyComplex_Type) < 0)
- Py_FatalError("Can't initalize complex type");
+ Py_FatalError("Can't initialize complex type");
+#endif
if (PyType_Ready(&PyFloat_Type) < 0)
Py_FatalError("Can't initialize float type");
@@ -2101,6 +2110,45 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&PyReversed_Type) < 0)
Py_FatalError("Can't initialize reversed type");
+
+ if (PyType_Ready(&PyCode_Type) < 0)
+ Py_FatalError("Can't initialize code type");
+
+ if (PyType_Ready(&PyFrame_Type) < 0)
+ Py_FatalError("Can't initialize frame type");
+
+ if (PyType_Ready(&PyCFunction_Type) < 0)
+ Py_FatalError("Can't initialize builtin function type");
+
+ if (PyType_Ready(&PyMethod_Type) < 0)
+ Py_FatalError("Can't initialize method type");
+
+ if (PyType_Ready(&PyFunction_Type) < 0)
+ Py_FatalError("Can't initialize function type");
+
+ if (PyType_Ready(&PyClass_Type) < 0)
+ Py_FatalError("Can't initialize class type");
+
+ if (PyType_Ready(&PyDictProxy_Type) < 0)
+ Py_FatalError("Can't initialize dict proxy type");
+
+ if (PyType_Ready(&PyGen_Type) < 0)
+ Py_FatalError("Can't initialize generator type");
+
+ if (PyType_Ready(&PyGetSetDescr_Type) < 0)
+ Py_FatalError("Can't initialize get-set descriptor type");
+
+ if (PyType_Ready(&PyWrapperDescr_Type) < 0)
+ Py_FatalError("Can't initialize wrapper type");
+
+ if (PyType_Ready(&PyInstance_Type) < 0)
+ Py_FatalError("Can't initialize instance type");
+
+ if (PyType_Ready(&PyEllipsis_Type) < 0)
+ Py_FatalError("Can't initialize ellipsis type");
+
+ if (PyType_Ready(&PyMemberDescr_Type) < 0)
+ Py_FatalError("Can't initialize member descriptor type");
}
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 8748fed..2eb3941 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -22,7 +22,7 @@ ellipsis_repr(PyObject *op)
return PyString_FromString("Ellipsis");
}
-static PyTypeObject PyEllipsis_Type = {
+PyTypeObject PyEllipsis_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"ellipsis", /* tp_name */
0, /* tp_basicsize */