summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-22 04:12:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:57 -0500
commit46f08cdacf5766e534614d6c26460a378774498d (patch)
treeb19b6afe2f035af6f51d3614d6a0f4f06653d0bc /source4
parent99721cc7c827457814f97c401462243c3584f480 (diff)
downloadsamba-46f08cdacf5766e534614d6c26460a378774498d.tar.gz
samba-46f08cdacf5766e534614d6c26460a378774498d.tar.bz2
samba-46f08cdacf5766e534614d6c26460a378774498d.zip
r2491: Handle pointers to scalars when converting to a Python dictionary (i.e
resume handles). Remove some now unused debugging code. (This used to be commit f250203a5f54c689c09ba780e9e3af7f8f2311bb)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/swig.pm31
1 files changed, 1 insertions, 30 deletions
diff --git a/source4/build/pidl/swig.pm b/source4/build/pidl/swig.pm
index 66cb72dd73..ae52ab3d9d 100644
--- a/source4/build/pidl/swig.pm
+++ b/source4/build/pidl/swig.pm
@@ -20,34 +20,6 @@ sub isunion($)
return $unions{$name};
}
-# Display properties of a structure field as commented out code
-
-sub DebugField($)
-{
- my($e) = shift;
- my($result) = "";
-
- $result .= "\t// $e->{TYPE} $e->{NAME} ";
-
- $result .= "(scalar) "
- if util::is_scalar_type($e->{TYPE});
-
- $result .= "pointers=$e->{POINTERS} "
- if $e->{POINTERS} > 0;
-
- my($size_is) = util::has_property($e, "size_is");
- $result .= "size_is=" . $size_is . " " if $size_is;
-
- my($length_is) = util::has_property($e, "length_is");
- $result .= "length_is=" . $length_is . " " if $length_is;
-
- $result .= "array_len=" . $e->{ARRAY_LEN} . " " if $e->{ARRAY_LEN};
-
- $result .= "\n";
-
- return $result;
-}
-
# Generate code to convert a Python object to an array
sub ArrayFromPython($$)
@@ -229,8 +201,7 @@ sub FieldToPython($$)
if ($e->{ARRAY_LEN} or util::has_property($e, "size_is")) {
$result .= ArrayToPython($e, $prefix);
} else {
- $result .= "\t// Pointer to scalar\n";
- $result .= DebugField($e);
+ $result .= "\tPyDict_SetItemString(obj, \"$e->{NAME}\", $e->{TYPE}_to_python(*s->$prefix$e->{NAME}));\n";
}
}
} else {