summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
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";