diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-05-30 14:15:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:18 -0500 |
commit | 41d7c0c1e388b86b0ed61c6f4f112ab253355079 (patch) | |
tree | a2a851a98e582a6ddab4f0bee7cc50477c3ac58c /source4/build | |
parent | aa2580cab28aa852cab649ca7efc21519dba137f (diff) | |
download | samba-41d7c0c1e388b86b0ed61c6f4f112ab253355079.tar.gz samba-41d7c0c1e388b86b0ed61c6f4f112ab253355079.tar.bz2 samba-41d7c0c1e388b86b0ed61c6f4f112ab253355079.zip |
r7111: Patch from Alan DeKok for correct use of the needed variables in Decl*
(This used to be commit 1e9beae533b2bd802c9651a3af620a464620d38e)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/eth_parser.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/build/pidl/eth_parser.pm b/source4/build/pidl/eth_parser.pm index a285dacf23..7dc50fe0f5 100644 --- a/source4/build/pidl/eth_parser.pm +++ b/source4/build/pidl/eth_parser.pm @@ -62,6 +62,7 @@ sub NeededTypedef($$) 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 @@ sub NeededTypedef($$) $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 @@ sub DeclInterface($$) # 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; } } |