Added comment about an untested code path...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -542,6 +542,7 @@ PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name)
|
|||||||
|
|
||||||
if (PyType_Check(klass)) { // new style classes
|
if (PyType_Check(klass)) { // new style classes
|
||||||
// This code is borrowed/adapted from _PyType_Lookup in typeobject.c
|
// This code is borrowed/adapted from _PyType_Lookup in typeobject.c
|
||||||
|
// (TODO: This part is not tested yet, so I'm not sure it is correct...)
|
||||||
PyTypeObject* type = (PyTypeObject*)klass;
|
PyTypeObject* type = (PyTypeObject*)klass;
|
||||||
PyObject *mro, *res, *base, *dict;
|
PyObject *mro, *res, *base, *dict;
|
||||||
/* Look in tp_dict of types in MRO */
|
/* Look in tp_dict of types in MRO */
|
||||||
@@ -559,7 +560,7 @@ PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name)
|
|||||||
assert(dict && PyDict_Check(dict));
|
assert(dict && PyDict_Check(dict));
|
||||||
res = PyDict_GetItem(dict, name);
|
res = PyDict_GetItem(dict, name);
|
||||||
if (res != NULL)
|
if (res != NULL)
|
||||||
return res;
|
return base;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user