svn commit: samba r2323 - in branches/SAMBA_4_0/source/build/pidl: .

tpot at samba.org tpot at samba.org
Mon Sep 13 12:14:49 GMT 2004


Author: tpot
Date: 2004-09-13 12:14:48 +0000 (Mon, 13 Sep 2004)
New Revision: 2323

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/build/pidl&rev=2323&nolog=1

Log:
More tweaks to get things building again.

Now to get unions working as they are currently broken.

Modified:
   branches/SAMBA_4_0/source/build/pidl/swig.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/swig.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/swig.pm	2004-09-13 11:55:36 UTC (rev 2322)
+++ branches/SAMBA_4_0/source/build/pidl/swig.pm	2004-09-13 12:14:48 UTC (rev 2323)
@@ -122,7 +122,7 @@
 	    # Non-scalar type, no pointer
 	    $result .= DebugElement($e);
 	} elsif ($e->{POINTERS} == 1) {
-	    $result .= "\ts->$prefix$e->{NAME} = $e->{TYPE}_from_python(mem_ctx, $obj);\n";
+	    $result .= "\ts->$prefix$e->{NAME} = $e->{TYPE}_from_python(mem_ctx, obj);\n";
 	} else {
 	    # Non-scalar type, multiple pointers
 	    $result .= DebugElement($e);
@@ -172,10 +172,9 @@
 
     # Input typemap
 
-    $res .= "%typemap(in) struct $fn->{NAME} * (struct $fn->{NAME} temp) {\n";
+    $res .= "%typemap(in) struct $fn->{NAME} * {\n";
     $res .= "\tTALLOC_CTX *mem_ctx = talloc_init(\"typemap(int) $fn->{NAME}\");\n\n";
-    $res .= "\t$fn->{NAME}_from_python(mem_ctx, &temp, \$input);\n";
-    $res .= "\t\$1 = &temp;\n";
+    $res .= "\t\$1 = $fn->{NAME}_from_python(mem_ctx, \$input);\n";
     $res .= "}\n\n";
 
     # Output typemap
@@ -190,10 +189,8 @@
     $res .= "\t\treturn NULL;\n";
     $res .= "\t}\n";
     $res .= "\n";
-    $res .= "\tdict = PyDict_New();\n";
+    $res .= "\tdict = $fn->{NAME}_to_python(mem_ctx, \$1);\n";
 
-    $res .= "\t$fn->{NAME}_to_python(mem_ctx, dict, \$1);\n";
-
     $res .= "\tresultobj = dict;\n";
     $res .= "}\n\n";
 



More information about the samba-cvs mailing list