diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-29 22:35:39 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-29 22:35:39 (GMT) |
commit | a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0 (patch) | |
tree | 8f865b488f65ff8bab485bafe1cdd8516a65c679 /Objects/descrobject.c | |
parent | 513b2ac76c1f56f5a6e0d07fee57d823819ee873 (diff) | |
download | cpython-a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0.zip cpython-a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0.tar.gz cpython-a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0.tar.bz2 |
Added all PyTypeObjects to the appropriate header files.
Before the patch a lot of internal types weren't available in the header files. The patch exposes the new iterators, views and some other types to all C modules. I've also renamed some of the types and tp_names.
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r-- | Objects/descrobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 294c7b3..c4d55e4 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -383,7 +383,7 @@ descr_traverse(PyObject *self, visitproc visit, void *arg) return 0; } -static PyTypeObject PyMethodDescr_Type = { +PyTypeObject PyMethodDescr_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "method_descriptor", sizeof(PyMethodDescrObject), @@ -421,7 +421,7 @@ static PyTypeObject PyMethodDescr_Type = { }; /* This is for METH_CLASS in C, not for "f = classmethod(f)" in Python! */ -static PyTypeObject PyClassMethodDescr_Type = { +PyTypeObject PyClassMethodDescr_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "classmethod_descriptor", sizeof(PyMethodDescrObject), @@ -458,7 +458,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), @@ -495,7 +495,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), @@ -786,7 +786,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 */ @@ -829,7 +829,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; |