summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-23 03:32:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:06 -0500
commit5821c39553f1d9899f6bcfb703876de767ccebf4 (patch)
tree8668772c3c2161dc4f3693c501bdd2f58cc07882 /source4/build/pidl
parent46cbe76a2c8c60bf14df941b2fcf6b8c5cad10e5 (diff)
downloadsamba-5821c39553f1d9899f6bcfb703876de767ccebf4.tar.gz
samba-5821c39553f1d9899f6bcfb703876de767ccebf4.tar.bz2
samba-5821c39553f1d9899f6bcfb703876de767ccebf4.zip
r2560: Don't require structure fields that have the pidl value() property
to be set. They can be if you want, but will be overwritten by the pidl push code. (This used to be commit 3170f6ed84e0514bf18d2a346f153bf0231b245b)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/swig.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/build/pidl/swig.pm b/source4/build/pidl/swig.pm
index dd007ffbd4..5cffff288b 100644
--- a/source4/build/pidl/swig.pm
+++ b/source4/build/pidl/swig.pm
@@ -104,7 +104,11 @@ sub FieldFromPython($$)
if ($e->{ARRAY_LEN}) {
$result .= ArrayFromPython($e, $prefix);
} else {
- $result .= "\ts->$prefix$e->{NAME} = $e->{TYPE}_from_python($obj, \"$e->{NAME}\");\n";
+ if (util::has_property($e, "value")) {
+ $result .= "\ts->$prefix$e->{NAME} = 0;\n";
+ } else {
+ $result .= "\ts->$prefix$e->{NAME} = $e->{TYPE}_from_python($obj, \"$e->{NAME}\");\n";
+ }
}
} else {
$result .= "\ts->$prefix$e->{NAME} = talloc(mem_ctx, sizeof($e->{TYPE}));\n";