mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r7605: Display properties in header files again.
This commit is contained in:
parent
e3496732c6
commit
5f37f7a524
@ -31,12 +31,10 @@ sub HeaderProperties($$)
|
||||
my($props,$ignores) = @_;
|
||||
my $ret = "";
|
||||
|
||||
return;
|
||||
|
||||
foreach my $d (keys %{$props}) {
|
||||
next if ($ignores->{$d});
|
||||
next if (grep(/^$d$/, @$ignores));
|
||||
if($props->{$d} ne "1") {
|
||||
$ret.= "$d(" . $props->{$d} . "),";
|
||||
$ret.= "$d($props->{$d}),";
|
||||
} else {
|
||||
$ret.="$d,";
|
||||
}
|
||||
@ -53,9 +51,6 @@ sub HeaderElement($)
|
||||
{
|
||||
my($element) = shift;
|
||||
|
||||
if (defined $element->{PROPERTIES}) {
|
||||
HeaderProperties($element->{PROPERTIES}, {"in" => 1, "out" => 1});
|
||||
}
|
||||
pidl tabs();
|
||||
HeaderType($element, $element->{TYPE}, "");
|
||||
pidl " ";
|
||||
@ -68,7 +63,7 @@ sub HeaderElement($)
|
||||
$nl = Ndr::GetNextLevel($element, $nl) if ($nl->{TYPE} eq "SUBCONTEXT");
|
||||
next if ($nl->{TYPE} eq "DATA" and typelist::scalar_is_reference($nl->{DATA_TYPE}));
|
||||
$prefix .= "*";
|
||||
} elsif (($l->{TYPE} eq "ARRAY")) {
|
||||
} elsif ($l->{TYPE} eq "ARRAY") {
|
||||
my $pl = Ndr::GetPrevLevel($element, $l);
|
||||
next if ($pl and $pl->{TYPE} eq "POINTER");
|
||||
|
||||
@ -85,7 +80,11 @@ sub HeaderElement($)
|
||||
if (defined $element->{ARRAY_LEN}[0] && util::is_constant($element->{ARRAY_LEN}[0])) {
|
||||
pidl "[$element->{ARRAY_LEN}[0]]";
|
||||
}
|
||||
pidl ";\n";
|
||||
pidl ";";
|
||||
if (defined $element->{PROPERTIES}) {
|
||||
HeaderProperties($element->{PROPERTIES}, ["in", "out"]);
|
||||
}
|
||||
pidl "\n";
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
@ -108,6 +107,9 @@ sub HeaderStruct($$)
|
||||
}
|
||||
$tab_depth--;
|
||||
pidl "}";
|
||||
if (defined $struct->{PROPERTIES}) {
|
||||
HeaderProperties($struct->{PROPERTIES}, []);
|
||||
}
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
@ -180,9 +182,6 @@ sub HeaderUnion($$)
|
||||
my($union,$name) = @_;
|
||||
my %done = ();
|
||||
|
||||
if (defined $union->{PROPERTIES}) {
|
||||
HeaderProperties($union->{PROPERTIES}, {});
|
||||
}
|
||||
pidl "\nunion $name {\n";
|
||||
$tab_depth++;
|
||||
foreach my $e (@{$union->{ELEMENTS}}) {
|
||||
@ -195,6 +194,10 @@ sub HeaderUnion($$)
|
||||
}
|
||||
$tab_depth--;
|
||||
pidl "}";
|
||||
|
||||
if (defined $union->{PROPERTIES}) {
|
||||
HeaderProperties($union->{PROPERTIES}, []);
|
||||
}
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
@ -456,9 +459,7 @@ sub Parse($)
|
||||
$res = "";
|
||||
pidl "/* header auto-generated by pidl */\n\n";
|
||||
foreach my $x (@{$idl}) {
|
||||
if ($x->{TYPE} eq "INTERFACE") {
|
||||
HeaderInterface($x);
|
||||
}
|
||||
($x->{TYPE} eq "INTERFACE") && HeaderInterface($x);
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user