[Kde-bindings] KDE/kdebindings/kalyptus

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Sep 22 15:38:46 UTC 2008


SVN commit 863587 by rdale:

* Skip methods called data_ptr() as they are really private in Qt
* Improve the parsing of arguments when deriving the munged method signature
* Should fix build problems reported by Stefano Crocco

CCMAIL: kde-bindings at kde.org



 M  +33 -19    kalyptusCxxToSmoke.pm  


--- trunk/KDE/kdebindings/kalyptus/kalyptusCxxToSmoke.pm #863586:863587
@@ -75,6 +75,9 @@
      'std::wstring' => '$',
      'std::wstring*' => '$',
      'std::wstring&' => '$',
+     'std::vector<char>' => '$',
+     'std::vector<char>*' => '$',
+     'std::vector<char>&' => '$',
      'QDBusObjectPath' => '$',
      'QDBusObjectPath*' => '$',
      'QDBusObjectPath&' => '$',
@@ -123,7 +126,7 @@
    'GLint' => 'int',
    'GLuint' => 'uint',
    'ksocklen_t' => 'uint',
-   'long long' => 'long',
+#   'long long' => 'long',
    'mode_t'  =>  'long',
    'MSG*'  =>  'void*',
    'pid_t' => 'int',
@@ -166,7 +169,7 @@
    'unsigned char' => 'uchar',
    'unsigned int' => 'uint',
    'unsigned long int' => 'ulong',
-   'unsigned long long' => 'ulong',
+#   'unsigned long long' => 'ulong',
    'unsigned long' => 'ulong',
    'unsigned short int' => 'ushort',
    'unsigned short' => 'ushort',
@@ -598,6 +601,7 @@
 			|| $m->{ReturnType} =~ /template/ 
 			|| $m->{ReturnType} =~ /QT3_SUPPORT/ 
 			|| $name eq 'qt_metacast' 
+			|| $name eq 'data_ptr' 
 			|| $name eq 'virtual_hook' 
 			|| $name eq 'handle' 
 			|| $name eq 'qWarning' 
@@ -744,6 +748,8 @@
 			|| ($className eq 'Solid::Networking' and $name eq 'setDisconnectPolicy')
 			|| ($className eq 'Solid::Networking' and $name eq 'disconnectPolicy')
 			|| ($className eq 'Solid::Networking' and $name eq 'setConnectPolicy')
+			|| ($className eq 'Soprano::Util::AsyncResult' and $name eq 'emitReady')
+			|| ($className eq 'Soprano::Util::AsyncResult' and $name eq 'setResult')
 			|| ($className eq 'Soprano::Server::ServerCore' and $name eq 'backendSettings')
 			|| ($className eq 'Soprano::Index::CLuceneIndex' and $name eq 'search')
 			|| ($className eq 'Soprano::NodeIterator' and $name eq 'NodeIterator' && $#{$m->{ParamList}} == 0 && $m->{ParamList}[0]->{ArgType} =~ /Backend/)
@@ -825,6 +831,7 @@
 			$m->{ParamList}[1]->{DefaultValue} = undef;
 			$m->{FirstDefaultParam} = undef;
         }
+
 	    $m->{ReturnType} = kalyptusDataDict::resolveType($m->{ReturnType}, $classNode, $rootnode) if ($m->{ReturnType});
 	    registerType( $m->{ReturnType} ) unless (defined($excludeClasses{$className}) && !($m->{Flags} =~ "v"));
 	} elsif ( $m->{NodeType} eq "enum" ) {
@@ -1137,12 +1144,13 @@
     my $protolist = shift;
 
     my $argcnt = scalar @{ $method->{ParamList} } - 1;
-    if($idx > $argcnt) {
-	push @$protolist, $proto;
-	return;
+    if ($idx > $argcnt) {
+        push @$protolist, $proto;
+        return;
     }
-    if(defined $method->{FirstDefaultParam} and $method->{FirstDefaultParam} <= $idx) {
-	push @$protolist, $proto;
+
+    if (defined $method->{FirstDefaultParam} and $method->{FirstDefaultParam} <= $idx) {
+        push @$protolist, $proto;
     }
 
     my $arg = $method->{ParamList}[$idx]->{ArgType};
@@ -1150,22 +1158,29 @@
     my $typeEntry = findTypeEntry( $arg );
     my $realType = $typeEntry->{realType};
 
-    # A scalar ?
     $arg =~ s/\bconst\b//g;
-    $arg =~ s/\s+//g;
-    if($typeEntry->{isEnum} || $allTypes{$realType}{isEnum} || exists $typeunion{$realType} || exists $mungedTypeMap{$arg})
+    $arg =~ s/\s+/ /g;
+    $arg =~ s/^\s//;
+    $arg =~ s/,\s/,/g;
+    $arg =~ s/>>/> >/g;
+    $arg =~ s/\s([*&])/$1/g;
+
+    if (    $typeEntry->{isEnum} 
+            || $allTypes{$realType}{isEnum} 
+            || exists $typeunion{$realType} 
+            || exists $mungedTypeMap{$arg} )
     {
-	my $id = '$'; # a 'scalar
-	$id = '?' if $arg =~ /[*&]{2}/;
-	$id = $mungedTypeMap{$arg} if exists $mungedTypeMap{$arg};
-	iterproto($classidx, $method, $proto . $id, $idx + 1, $protolist);
-	return;
+        my $id = '$'; # a 'scalar
+        $id = '?' if $arg =~ /[*&]{2}/;
+        $id = $mungedTypeMap{$arg} if exists $mungedTypeMap{$arg};
+        iterproto($classidx, $method, $proto . $id, $idx + 1, $protolist);
+        return;
     }
 
     # A class ?
-    if(exists $classidx->{$realType}) {
-	iterproto($classidx, $method, $proto . '#', $idx + 1, $protolist);
-	return;
+    if (exists $classidx->{$realType}) {
+        iterproto($classidx, $method, $proto . '#', $idx + 1, $protolist);
+        return;
     }
 
     # A non-scalar (reference to array or hash, undef)
@@ -1481,7 +1496,6 @@
     }
 
     my $returnType = $m->{ReturnType};
-
     $returnType = undef if ($returnType eq 'void');
 
     # Don't use $className here, it's never the fully qualified (A::B) name for a ctor.



More information about the Kde-bindings mailing list