diff options
Diffstat (limited to 'source4/build/pidl/header.pm')
-rw-r--r-- | source4/build/pidl/header.pm | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm index b192efb699..ba73570dab 100644 --- a/source4/build/pidl/header.pm +++ b/source4/build/pidl/header.pm @@ -212,19 +212,15 @@ sub HeaderTypedefProto($) { my($d) = shift; + my $tf = NdrParser::get_typefamily($d->{DATA}{TYPE}); + if (needed::is_needed("ndr_size_$d->{NAME}")) { - if ($d->{DATA}{TYPE} eq "STRUCT") { - pidl "size_t ndr_size_$d->{NAME}(const struct $d->{NAME} *r, int flags);\n"; - } - if ($d->{DATA}{TYPE} eq "UNION") { - pidl "size_t ndr_size_$d->{NAME}(const union $d->{NAME} *r, uint32_t level, int flags);\n"; - } + my $size_args = $tf->{SIZE_FN_ARGS}->($d); + pidl "size_t ndr_size_$d->{NAME}($size_args);\n"; } return unless util::has_property($d, "public"); - my $tf = NdrParser::get_typefamily($d->{DATA}{TYPE}); - my $pull_args = $tf->{PULL_FN_ARGS}->($d); my $push_args = $tf->{PUSH_FN_ARGS}->($d); my $print_args = $tf->{PRINT_FN_ARGS}->($d); @@ -281,7 +277,6 @@ sub HeaderFunctionInOut_needed($$) return undef; } - ##################################################################### # parse a function sub HeaderFunction($) @@ -347,7 +342,6 @@ sub HeaderFnProto($$) pidl "\n"; } - ##################################################################### # generate vtable structure for DCOM interface sub HeaderVTable($) @@ -365,7 +359,6 @@ sub HeaderVTable($) pidl "};\n\n"; } - ##################################################################### # parse the interface definitions sub HeaderInterface($) |