Author: metze
Date: 2005-02-21 11:01:57 +0000 (Mon, 21 Feb 2005)
New Revision: 5480

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5480

Log:
allow nopush and nopull on functions

metze

Modified:
   branches/SAMBA_4_0/source/build/pidl/ndr.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/ndr.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/ndr.pm 2005-02-21 01:16:47 UTC (rev 
5479)
+++ branches/SAMBA_4_0/source/build/pidl/ndr.pm 2005-02-21 11:01:57 UTC (rev 
5480)
@@ -1620,6 +1620,8 @@
 
        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 @@
 {
        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 @@
        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 @@
        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 @@
        
        # 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

Reply via email to