Skip to content

Commit

Permalink
Fixed bug in Base __getattro__ that caused __of__ to be missed in
Browse files Browse the repository at this point in the history
instances of instances of subclasses (meta classes) of ExtensionClass.
  • Loading branch information
Jim Fulton committed Feb 13, 2005
1 parent a6b8997 commit 2920187
Show file tree
Hide file tree
Showing 2 changed files with 754 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _ExtensionClass.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ Base_getattro(PyObject *obj, PyObject *name)
If the tp_descr_get of res is of_get,
then call it. */

if (res->ob_type->ob_type == &ExtensionClassType
if (PyObject_TypeCheck(res->ob_type,
&ExtensionClassType)
&& res->ob_type->tp_descr_get != NULL)
res = res->ob_type->tp_descr_get(
res, obj,
Expand Down

0 comments on commit 2920187

Please sign in to comment.