[Kde-bindings] KDE/kdebindings/kalyptus

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Jan 19 18:12:17 UTC 2009


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 at 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";



More information about the Kde-bindings mailing list