diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-09-01 20:33:56 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-09-01 20:33:56 (GMT) |
commit | e35dc5110f25ab4c43d6d73affc5b212e9be0262 (patch) | |
tree | 05d5f831b3ade563a0ee538bf0dab0e5803fd95a /Objects | |
parent | 5edbaf295e60e0152c3f240ebef6408fa74572c3 (diff) | |
parent | eff61f6927c94c82b5fc8f0a266340f1e91a363c (diff) | |
download | cpython-e35dc5110f25ab4c43d6d73affc5b212e9be0262.zip cpython-e35dc5110f25ab4c43d6d73affc5b212e9be0262.tar.gz cpython-e35dc5110f25ab4c43d6d73affc5b212e9be0262.tar.bz2 |
merge 3.2
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/descrobject.c | 9 | ||||
-rw-r--r-- | Objects/object.c | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 93daefd..a786bae 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -846,16 +846,13 @@ PyDictProxy_New(PyObject *dict) /* This has no reason to be in this file except that adding new files is a bit of a pain */ -/* forward */ -static PyTypeObject wrappertype; - typedef struct { PyObject_HEAD PyWrapperDescrObject *descr; PyObject *self; } wrapperobject; -#define Wrapper_Check(v) (Py_TYPE(v) == &wrappertype) +#define Wrapper_Check(v) (Py_TYPE(v) == &_PyMethodWrapper_Type) static void wrapper_dealloc(wrapperobject *wp) @@ -1021,7 +1018,7 @@ wrapper_traverse(PyObject *self, visitproc visit, void *arg) return 0; } -static PyTypeObject wrappertype = { +PyTypeObject _PyMethodWrapper_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "method-wrapper", /* tp_name */ sizeof(wrapperobject), /* tp_basicsize */ @@ -1070,7 +1067,7 @@ PyWrapper_New(PyObject *d, PyObject *self) assert(_PyObject_RealIsSubclass((PyObject *)Py_TYPE(self), (PyObject *)PyDescr_TYPE(descr))); - wp = PyObject_GC_New(wrapperobject, &wrappertype); + wp = PyObject_GC_New(wrapperobject, &_PyMethodWrapper_Type); if (wp != NULL) { Py_INCREF(descr); wp->descr = descr; diff --git a/Objects/object.c b/Objects/object.c index cf49e1b..52acf12 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1558,6 +1558,9 @@ _Py_ReadyTypes(void) if (PyType_Ready(&PyWrapperDescr_Type) < 0) Py_FatalError("Can't initialize wrapper type"); + if (PyType_Ready(&_PyMethodWrapper_Type) < 0) + Py_FatalError("Can't initialize method wrapper type"); + if (PyType_Ready(&PyEllipsis_Type) < 0) Py_FatalError("Can't initialize ellipsis type"); |