From c708ef80159d1b20a1319553c0ae3ecf602f03df Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 21 Feb 2005 11:01:57 +0000 Subject: r5480: allow nopush and nopull on functions metze (This used to be commit 0e82e7f02bdd61d8fd27ef3eab9b23ecaadb1e5a) --- source4/build/pidl/ndr.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source4/build') 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 -- cgit