summaryrefslogtreecommitdiff
path: root/source4/build/pidl/needed.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-02-11 02:05:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:41 -0500
commit0de6851e83d075e8c001255990b2018acc4a56c2 (patch)
tree9f5ebc9512992d2da6fcc7b9b034cfb9472b4077 /source4/build/pidl/needed.pm
parentaf7e9f2b5907a36d0d3c454d9ba9e49f98a11426 (diff)
downloadsamba-0de6851e83d075e8c001255990b2018acc4a56c2.tar.gz
samba-0de6851e83d075e8c001255990b2018acc4a56c2.tar.bz2
samba-0de6851e83d075e8c001255990b2018acc4a56c2.zip
r5320: Treat structs and unions somewhat more similarly:
- use same names in hashes (DATA -> ELEMENTS, etc) - [case()] and [default] are no longer special case, they're just regular properties (This used to be commit 6a0f599f822f5c42d93e78c13765804ab2223968)
Diffstat (limited to 'source4/build/pidl/needed.pm')
-rw-r--r--source4/build/pidl/needed.pm22
1 files changed, 1 insertions, 21 deletions
diff --git a/source4/build/pidl/needed.pm b/source4/build/pidl/needed.pm
index 37edbef83b..b70cb28356 100644
--- a/source4/build/pidl/needed.pm
+++ b/source4/build/pidl/needed.pm
@@ -38,7 +38,7 @@ sub NeededTypedef($)
$needed{"push_$t->{NAME}"} = 0;
}
- if ($t->{DATA}->{TYPE} eq "STRUCT") {
+ if ($t->{DATA}->{TYPE} eq "STRUCT" or $t->{DATA}->{TYPE} eq "UNION") {
if (util::has_property($t, "gensize")) {
$needed{"ndr_size_$t->{NAME}"} = 1;
}
@@ -53,26 +53,6 @@ sub NeededTypedef($)
}
}
}
- if ($t->{DATA}->{TYPE} eq "UNION") {
- if (util::has_property($t, "gensize")) {
- $needed{"ndr_size_$t->{NAME}"} = 1;
- }
-
- for my $e (@{$t->{DATA}->{DATA}}) {
- $e->{PARENT} = $t->{DATA};
- if ($e->{TYPE} eq "UNION_ELEMENT") {
- if ($needed{"pull_$t->{NAME}"}) {
- $needed{"pull_$e->{DATA}->{TYPE}"} = 1;
- }
- if ($needed{"push_$t->{NAME}"}) {
- $needed{"push_$e->{DATA}->{TYPE}"} = 1;
- }
- if ($needed{"ndr_size_$t->{NAME}"}) {
- $needed{"ndr_size_$e->{DATA}->{TYPE}"} = 1;
- }
- }
- }
- }
}
#####################################################################