diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/pidl/idl.gram | 1 | ||||
-rw-r--r-- | source4/build/pidl/parser.pm | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source4/build/pidl/idl.gram b/source4/build/pidl/idl.gram index e349a532ff..8cf35676f9 100644 --- a/source4/build/pidl/idl.gram +++ b/source4/build/pidl/idl.gram @@ -103,6 +103,7 @@ property: 'unique' | 'struct_len' | 'context_handle' | 'string' + | 'subcontext' | 'byte_count_pointer' '(' expression ')' {{ "$item[1]" => "$item{expression}" }} | 'size_is' '(' expression ')' {{ "$item[1]" => "$item{expression}" }} | 'length_is' '(' expression ')' {{ "$item[1]" => "$item{expression}" }} diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index 99f3fdf4bb..8eb8ed4deb 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -291,6 +291,12 @@ sub ParseElementPullScalar($$$) # no scalar component } elsif (my $switch = util::has_property($e, "switch_is")) { ParseElementPullSwitch($e, $var_prefix, $ndr_flags, $switch); + } elsif (util::has_property($e, "subcontext")) { + if (util::is_builtin_type($e->{TYPE})) { + $res .= "\tNDR_CHECK(ndr_pull_subcontext_fn(ndr, $cprefix$var_prefix$e->{NAME}, (ndr_pull_fn_t) ndr_pull_$e->{TYPE}));\n"; + } else { + $res .= "\tNDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, $cprefix$var_prefix$e->{NAME}, (ndr_pull_flags_fn_t) ndr_pull_$e->{TYPE}));\n"; + } } elsif (util::is_builtin_type($e->{TYPE})) { $res .= "\tNDR_CHECK(ndr_pull_$e->{TYPE}(ndr, $cprefix$var_prefix$e->{NAME}));\n"; } else { @@ -391,6 +397,12 @@ sub ParseElementPullBuffer($$$) } else { ParseElementPullSwitch($e, $var_prefix, "NDR_BUFFERS", $switch); } + } elsif (util::has_property($e, "subcontext")) { + if (util::is_builtin_type($e->{TYPE})) { + $res .= "\tNDR_CHECK(ndr_pull_subcontext_fn(ndr, $cprefix$var_prefix$e->{NAME}, (ndr_pull_fn_t) ndr_pull_$e->{TYPE}));\n"; + } else { + $res .= "\tNDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, $cprefix$var_prefix$e->{NAME}, (ndr_pull_flags_fn_t) ndr_pull_$e->{TYPE}));\n"; + } } elsif (util::is_builtin_type($e->{TYPE})) { $res .= "\t\tNDR_CHECK(ndr_pull_$e->{TYPE}(ndr, $cprefix$var_prefix$e->{NAME}));\n"; } elsif ($e->{POINTERS}) { |