diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-09 07:22:48 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-09 07:22:48 +0000 |
commit | b7a6971ce10fb3934d907947562ab5032cb9dae9 (patch) | |
tree | 1d86444b15d1df665bb79f3e293b59183edad689 /source4/build/pidl/header.pm | |
parent | 363754a8654abc526bc44c36e2cd29c9eefb4cd2 (diff) | |
download | samba-b7a6971ce10fb3934d907947562ab5032cb9dae9.tar.gz samba-b7a6971ce10fb3934d907947562ab5032cb9dae9.tar.bz2 samba-b7a6971ce10fb3934d907947562ab5032cb9dae9.zip |
- 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)
Diffstat (limited to 'source4/build/pidl/header.pm')
-rw-r--r-- | source4/build/pidl/header.pm | 16 |
1 files changed, 13 insertions, 3 deletions
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++; + } + } } |