summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Header.pm15
2 files changed, 8 insertions, 9 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm
index 4b7a753fa5..e7b790d1e5 100644
--- a/source4/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/NDR.pm
@@ -634,6 +634,8 @@ sub Parse($)
my $idl = shift;
return undef unless (defined($idl));
+
+ Parse::Pidl::NDR::Validate($idl);
my @ndr = ();
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
index a1c568cdc7..46caba731a 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
@@ -17,10 +17,7 @@ $VERSION = '0.01';
my($res);
my($tab_depth);
-sub pidl ($)
-{
- $res .= shift;
-}
+sub pidl($) { $res .= shift; }
sub tabs()
{
@@ -261,7 +258,7 @@ sub HeaderFunctionInOut_needed($$)
return undef;
}
-my %headerstructs = ();
+my %headerstructs;
#####################################################################
# parse a function
@@ -313,8 +310,6 @@ sub HeaderInterface($)
{
my($interface) = shift;
- my $count = 0;
-
pidl "#ifndef _HEADER_$interface->{NAME}\n";
pidl "#define _HEADER_$interface->{NAME}\n\n";
@@ -337,6 +332,7 @@ sub HeaderInterface($)
foreach my $d (@{$interface->{DATA}}) {
next if ($d->{TYPE} ne "FUNCTION");
+
HeaderFunction($d);
}
@@ -351,9 +347,10 @@ sub Parse($)
$tab_depth = 0;
$res = "";
+ %headerstructs = ();
pidl "/* header auto-generated by pidl */\n\n";
- foreach my $x (@{$idl}) {
- ($x->{TYPE} eq "INTERFACE") && HeaderInterface($x);
+ foreach (@{$idl}) {
+ ($_->{TYPE} eq "INTERFACE") && HeaderInterface($_);
}
return $res;
}