Skip to content

Commit

Permalink
Attempt to port @therve's patch to current trunk.
Browse files Browse the repository at this point in the history
Unfortunately, it breaks 'tox -e docs'.

See #2.
  • Loading branch information
tseaver committed Jan 19, 2015
1 parent d63d109 commit f66e57b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/zope/proxy/_zope_proxy_proxy.c
Expand Up @@ -215,17 +215,21 @@ WrapperType_Lookup(PyTypeObject *type, PyObject *name)

if (((PyTypeObject *)base) != &ProxyType) {
#if PY_MAJOR_VERSION < 3
if (PyClass_Check(base))
dict = ((PyClassObject *)base)->cl_dict;
if (PyClass_Check(base)) {
//dict = ((PyClassObject *)base)->cl_dict;
dict = GetAttrString(base, "__dict__");
}
else
#endif
{
assert(PyType_Check(base));
dict = ((PyTypeObject *)base)->tp_dict;
Py_INCREF(dict);
}

assert(dict && PyDict_Check(dict));
res = PyDict_GetItem(dict, name);
Py_DECREF(dict);
if (res != NULL)
return res;
}
Expand Down

0 comments on commit f66e57b

Please sign in to comment.