svn commit: samba r7111 - in branches/SAMBA_4_0/source/build/pidl: .

jelmer at samba.org jelmer at samba.org
Mon May 30 14:15:21 GMT 2005


Author: jelmer
Date: 2005-05-30 14:15:20 +0000 (Mon, 30 May 2005)
New Revision: 7111

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

Log:
Patch from Alan DeKok for correct use of the needed variables in Decl*

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


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/eth_parser.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/eth_parser.pm	2005-05-30 13:52:52 UTC (rev 7110)
+++ branches/SAMBA_4_0/source/build/pidl/eth_parser.pm	2005-05-30 14:15:20 UTC (rev 7111)
@@ -62,6 +62,7 @@
 
 	if (util::has_property($t, "public")) {
 		$needed->{"pull_$t->{NAME}"} = not util::has_property($t, "nopull");
+		$needed->{"decl_$t->{NAME}"} = not util::has_property($t, "nopull");
 	}
 
 	if ($t->{DATA}->{TYPE} eq "STRUCT" or $t->{DATA}->{TYPE} eq "UNION") {
@@ -70,7 +71,7 @@
 			$e->{PARENT} = $t->{DATA};
 			if ($needed->{"pull_$t->{NAME}"} and
 				not defined($needed->{"pull_$e->{TYPE}"})) {
-				$needed->{"pull_$e->{TYPE}"} = 1;
+				$needed->{"decl_$e->{TYPE}"} = $needed->{"pull_$e->{TYPE}"} = 1;
 			}
 
 	        $needed->{"hf_$t->{NAME}_$e->{NAME}"} = {
@@ -1182,19 +1183,20 @@
 
 	# Typedefs
 	foreach my $d (@{$interface->{TYPEDEFS}}) {
-		($needed->{"pull_$d->{NAME}"}) && DeclTypedef($d);
-
-		# Make sure we don't generate a function twice...
-		$needed->{"pull_$d->{NAME}"} = 0;
+		($needed->{"decl_$d->{NAME}"}) && DeclTypedef($d, $needed);
 	}
 }
 
-sub DeclTypedef($)
+sub DeclTypedef($$)
 {
 	my $e = shift;
+	my $needed = shift;
 
 	if (defined($typefamily{$e->{DATA}->{TYPE}}->{DECL})) {
 		$typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e->{DATA}, $e->{NAME});
+
+		# Make sure we don't generate a function twice...
+		$needed->{"decl_$e->{NAME}"} = 0;
 	}
 }
 



More information about the samba-cvs mailing list