diff --git a/etg/dataobj.py b/etg/dataobj.py index 7b798045..95c3c16e 100644 --- a/etg/dataobj.py +++ b/etg/dataobj.py @@ -35,7 +35,7 @@ def run(): c = module.find('wxDataFormat') assert isinstance(c, etgtools.ClassDef) - c.find('GetType').setCppCode("sipRes = static_cast(sipCpp->GetType());") + c.find('GetType').setCppCode("return static_cast(self->GetType());") #----------------------------------------------------------------- tools.doCommonTweaks(module) diff --git a/etg/layout.py b/etg/layout.py index 2f0403ab..0bb88a6d 100644 --- a/etg/layout.py +++ b/etg/layout.py @@ -36,7 +36,7 @@ def run(): c = module.find('wxIndividualLayoutConstraint') assert isinstance(c, etgtools.ClassDef) - c.find('GetOtherWindow').setCppCode('sipRes = (wxWindow*)sipCpp->GetOtherWindow();') + c.find('GetOtherWindow').setCppCode('return (wxWindow*)self->GetOtherWindow();') c.addProperty('Done GetDone SetDone') c.addProperty('Margin GetMargin SetMargin') diff --git a/etg/menu.py b/etg/menu.py index abdf4f8b..1ae9364a 100644 --- a/etg/menu.py +++ b/etg/menu.py @@ -50,17 +50,19 @@ def run(): c.find('wxMenuBar').findOverload('wxMenu *menus[], const wxString titles[], long style=0)').ignore() c.find('FindItem').ignore() mac_scmb = c.find('MacSetCommonMenuBar') - mac_scmb.setCppCode(""" -#ifdef __WXMAC__ - wxMenuBar::MacSetCommonMenuBar(menubar); -#endif + mac_scmb.setCppCode("""\ + #ifdef __WXMAC__ + wxMenuBar::MacSetCommonMenuBar(menubar); + #endif """) mac_gcmb = c.find('MacGetCommonMenuBar') - mac_gcmb.setCppCode(""" -#ifdef __WXMAC__ - sipRes = wxMenuBar::MacGetCommonMenuBar(); -#endif + mac_gcmb.setCppCode("""\ + #ifdef __WXMAC__ + return wxMenuBar::MacGetCommonMenuBar(); + #else + return NULL; + #endif """) # don't transfer on other platforms, as this is a no-op there.