diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-04-29 14:51:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:16 -0500 |
commit | fc487fb552f38ae41c6a406f0b1cad0c84aa0c2d (patch) | |
tree | 4d28ee070be56cc5f7a3f4eee6ce2c7b1b3cd9f5 /source4/pidl | |
parent | 25bd77ad555a8c6992beb60434c411413ef79896 (diff) | |
download | samba-fc487fb552f38ae41c6a406f0b1cad0c84aa0c2d.tar.gz samba-fc487fb552f38ae41c6a406f0b1cad0c84aa0c2d.tar.bz2 samba-fc487fb552f38ae41c6a406f0b1cad0c84aa0c2d.zip |
r15324: Generate prototype even if the function itself is
written manually.
(This used to be commit 56eceeb3221b768b754f6eca10d020148264e869)
Diffstat (limited to 'source4/pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 38e3268356..4d40699435 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -194,13 +194,13 @@ sub check_null_pointer_void($) ##################################################################### # declare a function public or static, depending on its attributes -sub fn_declare($$) +sub fn_declare($$$) { - my ($fn,$decl) = @_; + my ($type,$fn,$decl) = @_; - if (has_property($fn, "public")) { + if (has_property($fn, "no$type") or has_property($fn, "public")) { pidl_hdr "$decl;"; - pidl "_PUBLIC_ $decl"; + pidl "_PUBLIC_ $decl" unless (has_property($fn, "no$type")); } else { pidl "static $decl"; } @@ -1814,7 +1814,7 @@ sub ParseTypedefPush($) my($e) = shift; my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"push"); - fn_declare($e, "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, $args)"); + fn_declare("push", $e, "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, $args)"); pidl "{"; indent; @@ -1833,7 +1833,7 @@ sub ParseTypedefPull($) my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"pull"); - fn_declare($e, "NTSTATUS ndr_pull_$e->{NAME}(struct ndr_pull *ndr, int ndr_flags, $args)"); + fn_declare("pull", $e, "NTSTATUS ndr_pull_$e->{NAME}(struct ndr_pull *ndr, int ndr_flags, $args)"); pidl "{"; indent; @@ -1871,7 +1871,7 @@ sub ParseTypedefNdrSize($) my $tf = $typefamily{$t->{DATA}->{TYPE}}; my $args = $tf->{SIZE_FN_ARGS}->($t); - fn_declare($t, "size_t ndr_size_$t->{NAME}($args)"); + fn_declare("size", $t, "size_t ndr_size_$t->{NAME}($args)"); pidl "{"; indent; @@ -1952,9 +1952,9 @@ sub ParseFunctionPush($) { my($fn) = shift; - return if has_property($fn, "nopush"); + fn_declare("push", $fn, "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, const struct $fn->{NAME} *r)"); - fn_declare($fn, "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, const struct $fn->{NAME} *r)"); + return if has_property($fn, "nopush"); pidl "{"; indent; @@ -2032,10 +2032,11 @@ sub ParseFunctionPull($) { my($fn) = shift; + # pull function args + fn_declare("pull", $fn, "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)"); + return if has_property($fn, "nopull"); - # pull function args - fn_declare($fn, "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)"); pidl "{"; indent; |