From b7a6971ce10fb3934d907947562ab5032cb9dae9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 9 Nov 2003 07:22:48 +0000 Subject: - handle void functions - bettenicer handling of PROPERTIES - handle size_is() on an out variable that refers to an in variable (This used to be commit 33d9b75783651ccb02f895bc9e0b0d0d59f67b1d) --- source4/build/pidl/header.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source4/build/pidl/header.pm') diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm index bbb35534ac..5068bdd1b3 100644 --- a/source4/build/pidl/header.pm +++ b/source4/build/pidl/header.pm @@ -41,7 +41,7 @@ sub DumpElement($) { my($element) = shift; - if (util::has_property($element->{PROPERTIES}, "struct_len")) { + if (util::has_property($element, "struct_len")) { # a struct_len is an internal artifact - it is put on the # wire but not exposed via the api, which means it does # not appear in the header file @@ -143,7 +143,7 @@ sub DumpFunctionInOut($$) my($fn) = shift; my($prop) = shift; foreach my $e (@{$fn->{DATA}}) { - if (util::has_property($e->{PROPERTIES}, $prop)) { + if (util::has_property($e, $prop)) { DumpElement($e); } } @@ -168,7 +168,7 @@ sub DumpFunction($) $res .= "struct {\n"; $tab_depth++; DumpFunctionInOut($fn, "out"); - if ($fn->{RETURN_TYPE}) { + if ($fn->{RETURN_TYPE} && $fn->{RETURN_TYPE} ne "void") { tabs(); $res .= "$fn->{RETURN_TYPE} result;\n"; } @@ -191,6 +191,16 @@ sub DumpInterface($) ($d->{TYPE} eq "FUNCTION") && DumpFunction($d); } + + my $count = 0; + + foreach my $d (@{$data}) { + if ($d->{TYPE} eq "FUNCTION") { + $u_name = uc $d->{NAME}; + $res .= "#define DCERPC_$u_name $count\n"; + $count++; + } + } } -- cgit