summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-02-18 12:04:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:46 -0500
commit1c3140b336b8305cdf6b2ea2e3125af7257389eb (patch)
treec56746d58755f35e9c2609b22a70c5ddeb413b71 /source4/build/pidl
parent06a19b39d1cb217ac725464ae185bd29517d78bf (diff)
downloadsamba-1c3140b336b8305cdf6b2ea2e3125af7257389eb.tar.gz
samba-1c3140b336b8305cdf6b2ea2e3125af7257389eb.tar.bz2
samba-1c3140b336b8305cdf6b2ea2e3125af7257389eb.zip
r5443: Fix HeaderProperties(). Not re-enabling yet because I don't know why it
was disabled in the first place. (This used to be commit e52256aec27e2aba8893cd2e570874482696b230)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/header.pm37
1 files changed, 22 insertions, 15 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index 57689c6165..d450886604 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -25,21 +25,26 @@ sub tabs()
#####################################################################
# parse a properties list
-sub HeaderProperties($)
+sub HeaderProperties($$)
{
my($props) = shift;
+ my($ignores) = shift;
+ my $ret = "";
- return;
+ return;
- foreach my $d (@{$props}) {
- if (ref($d) ne "HASH") {
- pidl "/* [$d] */ ";
- } else {
- foreach my $k (keys %{$d}) {
- pidl "/* [$k($d->{$k})] */ ";
- }
+ foreach my $d (keys %{$props}) {
+ next if ($ignores->{$d});
+ if($props->{$d} ne "1") {
+ $ret.= "$d(" . $props->{$d} . "),";
+ } else {
+ $ret.="$d,";
+ }
+ }
+
+ if ($ret) {
+ pidl "/* [" . substr($ret, 0, -1) . "] */";
}
- }
}
#####################################################################
@@ -48,7 +53,9 @@ sub HeaderElement($)
{
my($element) = shift;
- (defined $element->{PROPERTIES}) && HeaderProperties($element->{PROPERTIES});
+ if (defined $element->{PROPERTIES}) {
+ HeaderProperties($element->{PROPERTIES}, {"in" => 1, "out" => 1});
+ }
pidl tabs();
HeaderType($element, $element->{TYPE}, "");
pidl " ";
@@ -151,7 +158,9 @@ sub HeaderUnion($$)
my($name) = shift;
my %done = ();
- (defined $union->{PROPERTIES}) && HeaderProperties($union->{PROPERTIES});
+ if (defined $union->{PROPERTIES}) {
+ HeaderProperties($union->{PROPERTIES}, {});
+ }
pidl "\nunion $name {\n";
$tab_depth++;
foreach my $e (@{$union->{ELEMENTS}}) {
@@ -235,9 +244,7 @@ sub HeaderTypedefProto($)
}
}
- if (!util::has_property($d, "public")) {
- return;
- }
+ return unless util::has_property($d, "public");
my $tf = NdrParser::get_typefamily($d->{DATA}{TYPE});