From kde-bindings Mon Jan 19 18:12:17 2009 From: Richard Dale Date: Mon, 19 Jan 2009 18:12:17 +0000 To: kde-bindings Subject: [Kde-bindings] KDE/kdebindings/kalyptus Message-Id: <1232388737.377291.8487.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-bindings&m=123238875426671 SVN commit 913679 by rdale: * The bindings code generation for Singleton classes was wrong and caused a crash. Fixes problem reported by 0xDeadC0de with his Plasma applet CCMAIL: kde-bindings@kde.org M +3 -4 kalyptusCxxToSmoke.pm --- trunk/KDE/kdebindings/kalyptus/kalyptusCxxToSmoke.pm #913678:913679 @@ -1824,11 +1824,10 @@ $methodCode .= " $className *xthis;\n"; $methodCode .= "public:\n"; if ($classNode->{Singleton}) { - $switchCode .= " $xClassName *xself = ($xClassName *) $className" . "::self();\n"; - } else { - $methodCode .= " $xClassName\(void *x) : xthis(($className*)x) {}\n"; - $switchCode .= " $xClassName xtmp(obj), *xself = &xtmp;\n"; + $switchCode .= " obj = $className" . "::self();\n"; } + $methodCode .= " $xClassName\(void *x) : xthis(($className*)x) {}\n"; + $switchCode .= " $xClassName xtmp(obj), *xself = &xtmp;\n"; } else { $switchCode .= " $xClassName *xself = ($xClassName*)obj;\n"; $methodCode .= "public:\n"; _______________________________________________ Kde-bindings mailing list Kde-bindings@kde.org https://mail.kde.org/mailman/listinfo/kde-bindings