diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-02-21 11:01:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:49 -0500 |
commit | c708ef80159d1b20a1319553c0ae3ecf602f03df (patch) | |
tree | 732725c182c7011bbfbd24a69e37898e8700e9d0 /source4/build/pidl/ndr.pm | |
parent | 7e400d38ecfdbf2b0ba744b182db14fe286da404 (diff) | |
download | samba-c708ef80159d1b20a1319553c0ae3ecf602f03df.tar.gz samba-c708ef80159d1b20a1319553c0ae3ecf602f03df.tar.bz2 samba-c708ef80159d1b20a1319553c0ae3ecf602f03df.zip |
r5480: allow nopush and nopull on functions
metze
(This used to be commit 0e82e7f02bdd61d8fd27ef3eab9b23ecaadb1e5a)
Diffstat (limited to 'source4/build/pidl/ndr.pm')
-rw-r--r-- | source4/build/pidl/ndr.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index 019300d784..d02d2c402f 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -1620,6 +1620,8 @@ sub ParseTypedefPrint($) my $args = $typefamily{$e->{DATA}->{TYPE}}->{PRINT_FN_ARGS}->($e); + return unless !util::has_property($e, "noprint"); + pidl "void ndr_print_$e->{NAME}($args)"; pidl "{"; indent; @@ -1654,6 +1656,8 @@ sub ParseFunctionPrint($) { my($fn) = shift; + return unless !util::has_property($fn, "noprint"); + pidl "void ndr_print_$fn->{NAME}(struct ndr_print *ndr, const char *name, int flags, struct $fn->{NAME} *r)"; pidl "{"; indent; @@ -1736,6 +1740,8 @@ sub ParseFunctionPush($) my($fn) = shift; my $static = fn_prefix($fn); + return unless !util::has_property($fn, "nopush"); + pidl $static . "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, struct $fn->{NAME} *r)"; pidl "{"; indent; @@ -1849,6 +1855,8 @@ sub ParseFunctionPull($) my($fn) = shift; my $static = fn_prefix($fn); + return unless !util::has_property($fn, "nopull"); + # pull function args pidl $static . "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)"; pidl "{"; @@ -2015,14 +2023,10 @@ sub ParseInterface($) # Print functions foreach my $d (@{$data}) { - if ($d->{TYPE} eq "TYPEDEF" && - !util::has_property($d, "noprint")) { + ($d->{TYPE} eq "TYPEDEF") && ParseTypedefPrint($d); - } - if ($d->{TYPE} eq "FUNCTION" && - !util::has_property($d, "noprint")) { + ($d->{TYPE} eq "FUNCTION") && ParseFunctionPrint($d); - } } # Size functions |