Commit c27ce3f9 authored by Boxiang Sun's avatar Boxiang Sun

Use PyObject_GetAttrWrapper instead access PyClassObject directly.

PyClassObject in Pyston is just an opaque pointer. Don't access it directlly.
parent 5f986107
......@@ -173,6 +173,7 @@ WrapperType_Lookup(PyTypeObject *type, PyObject *name)
base = PyTuple_GET_ITEM(mro, i);
if (((PyTypeObject *)base) != &ProxyType) {
/*
if (PyClass_Check(base))
dict = ((PyClassObject *)base)->cl_dict;
else {
......@@ -180,6 +181,8 @@ WrapperType_Lookup(PyTypeObject *type, PyObject *name)
dict = ((PyTypeObject *)base)->tp_dict;
}
assert(dict && PyDict_Check(dict));
*/
dict = PyObject_GetAttrWrapper(base);
res = PyDict_GetItem(dict, name);
if (res != NULL)
return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment