new sip and siplib

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-12-16 00:02:59 +00:00
parent 9912e33123
commit 008c1f4a12
5 changed files with 200 additions and 26 deletions

View File

@@ -8605,6 +8605,16 @@ static sipTypeDef *getGeneratedType(const sipEncodedTypeDef *enc,
}
/*
* Return the generated class type structure of a class's super-class.
*/
sipClassTypeDef *sipGetGeneratedClassType(sipEncodedTypeDef *enc,
const sipClassTypeDef *ctd)
{
return (sipClassTypeDef *)getGeneratedType(enc, ctd->ctd_base.td_module);
}
/*
* Find a particular slot function for a type.
*/
@@ -8631,19 +8641,15 @@ static void *findSlot(PyObject *self, sipPySlotType st)
/* Search any super-types. */
if ((sup = ctd->ctd_supers) != NULL)
{
sipClassTypeDef *sup_ctd;
do
{
sup_ctd = (sipClassTypeDef *)getGeneratedType(sup,
ctd->ctd_base.td_module);
sipClassTypeDef *sup_ctd = sipGetGeneratedClassType(sup,
ctd);
if (sup_ctd->ctd_pyslots != NULL)
slot = findSlotInType(sup_ctd->ctd_pyslots, st);
}
while (slot == NULL && !sup++->sc_flag);
}
}
}
else
@@ -9176,7 +9182,7 @@ static int sipSimpleWrapper_traverse(sipSimpleWrapper *self, visitproc visit,
if ((sup = ctd->ctd_supers) != NULL)
do
sup_ctd = (sipClassTypeDef *)getGeneratedType(sup, ctd->ctd_base.td_module);
sup_ctd = sipGetGeneratedClassType(sup, ctd);
while (sup_ctd->ctd_traverse == NULL && !sup++->sc_flag);
}