Commit 7cc8f725 authored by Boxiang Sun's avatar Boxiang Sun

Use PyObject_GetAttrWrapper in Pyston instead access PyClassObject directly.

The PyClassObject is an opaque pointer in Pyston. Don't access its member
directly. Use PyObject_GetAttrWrapper instead.
parent 95c8b05c
......@@ -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