r24505: pass down $fn one level
authorStefan Metzmacher <metze@samba.org>
Fri, 17 Aug 2007 07:06:02 +0000 (07:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:02:04 +0000 (15:02 -0500)
metze
(This used to be commit 0bad3f06199341aeacef228e482ab755e2e48306)

source4/pidl/lib/Parse/Pidl/Samba4/Header.pm

index 650b6f51abfd6c8a26254dafa422a5a0a9de5fd1..3c0a7bc24e25b1bc6ebb4a0b842c025e73abf7ed 100644 (file)
@@ -290,24 +290,24 @@ sub HeaderFunction($)
        $tab_depth++;
        my $needed = 0;
 
-       if (HeaderFunctionInOut_needed($fn, "in") or
-           HeaderFunctionInOut_needed($fn, "inout")) {
+       if (HeaderFunctionInOut_needed($fn->{ORIGINAL}, "in") or
+           HeaderFunctionInOut_needed($fn->{ORIGINAL}, "inout")) {
                pidl tabs()."struct {\n";
                $tab_depth++;
-               HeaderFunctionInOut($fn, "in");
-               HeaderFunctionInOut($fn, "inout");
+               HeaderFunctionInOut($fn->{ORIGINAL}, "in");
+               HeaderFunctionInOut($fn->{ORIGINAL}, "inout");
                $tab_depth--;
                pidl tabs()."} in;\n\n";
                $needed++;
        }
 
-       if (HeaderFunctionInOut_needed($fn, "out") or
-           HeaderFunctionInOut_needed($fn, "inout")) {
+       if (HeaderFunctionInOut_needed($fn->{ORIGINAL}, "out") or
+           HeaderFunctionInOut_needed($fn->{ORIGINAL}, "inout")) {
                pidl tabs()."struct {\n";
                $tab_depth++;
-               HeaderFunctionInOut($fn, "out");
-               HeaderFunctionInOut($fn, "inout");
-               if ($fn->{RETURN_TYPE} ne "void") {
+               HeaderFunctionInOut($fn->{ORIGINAL}, "out");
+               HeaderFunctionInOut($fn->{ORIGINAL}, "inout");
+               if (defined($fn->{RETURN_TYPE})) {
                        pidl tabs().mapTypeName($fn->{RETURN_TYPE}) . " result;\n";
                }
                $tab_depth--;
@@ -368,8 +368,8 @@ sub HeaderInterface($)
                                 $d->{TYPE} eq "ENUM");
        }
 
-       foreach my $d (@{$interface->{FUNCTIONS}}) {
-               HeaderFunction($d->{ORIGINAL});
+       foreach my $fn (@{$interface->{FUNCTIONS}}) {
+               HeaderFunction($fn);
        }
 
        pidl "#endif /* _HEADER_$interface->{NAME} */\n";