From 5821c39553f1d9899f6bcfb703876de767ccebf4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 23 Sep 2004 03:32:46 +0000 Subject: 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) --- source4/build/pidl/swig.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/build') 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"; -- cgit