[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    [Kde-bindings] KDE/kdebindings/kalyptus
From:       Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date:       2009-01-19 18:12:17
Message-ID: 1232388737.377291.8487.nullmailer () svn ! kde ! org
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic