summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-13 12:14:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:44 -0500
commit6c4a789d605fbad1313f92cc35b20be50e1eef7d (patch)
treefa29b2dcef669c609d9cef80ff7c558c4b7bdd24
parent6f2fb2feb406a9e9f1411ab37d09054b9f31cfbc (diff)
downloadsamba-6c4a789d605fbad1313f92cc35b20be50e1eef7d.tar.gz
samba-6c4a789d605fbad1313f92cc35b20be50e1eef7d.tar.bz2
samba-6c4a789d605fbad1313f92cc35b20be50e1eef7d.zip
r2323: More tweaks to get things building again.
Now to get unions working as they are currently broken. (This used to be commit 8072d7f1a4f72d91d54c0e6056819ba5f99ce734)
-rw-r--r--source4/build/pidl/swig.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/build/pidl/swig.pm b/source4/build/pidl/swig.pm
index e7f77f05ed..c6a398f6b4 100644
--- a/source4/build/pidl/swig.pm
+++ b/source4/build/pidl/swig.pm
@@ -122,7 +122,7 @@ sub XToPython($$)
# 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 @@ sub ParseFunction($)
# 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,9 +189,7 @@ sub ParseFunction($)
$res .= "\t\treturn NULL;\n";
$res .= "\t}\n";
$res .= "\n";
- $res .= "\tdict = PyDict_New();\n";
-
- $res .= "\t$fn->{NAME}_to_python(mem_ctx, dict, \$1);\n";
+ $res .= "\tdict = $fn->{NAME}_to_python(mem_ctx, \$1);\n";
$res .= "\tresultobj = dict;\n";
$res .= "}\n\n";