summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/ndr.pm1
-rwxr-xr-xsource4/build/pidl/pidl.pl5
-rw-r--r--source4/build/pidl/typelist.pm15
3 files changed, 20 insertions, 1 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm
index 185067e526..da2086e765 100644
--- a/source4/build/pidl/ndr.pm
+++ b/source4/build/pidl/ndr.pm
@@ -2092,7 +2092,6 @@ sub LoadInterface($)
foreach my $d (@{$x->{DATA}}) {
if (($d->{TYPE} eq "DECLARE") or ($d->{TYPE} eq "TYPEDEF")) {
- typelist::addType($d);
if ($d->{DATA}->{TYPE} eq "STRUCT" or $d->{DATA}->{TYPE} eq "UNION") {
CheckPointerTypes($d->{DATA}, $x->{PROPERTIES}->{pointer_default});
}
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl
index 514421e690..eedbb91d4e 100755
--- a/source4/build/pidl/pidl.pl
+++ b/source4/build/pidl/pidl.pl
@@ -23,6 +23,7 @@ use stub;
use ndr;
use eparser;
use validator;
+use typelist;
use util;
use template;
use swig;
@@ -138,6 +139,10 @@ sub process_file($)
print IdlDump::Dump($pidl);
}
+ if ($opt_header || $opt_parser) {
+ typelist::LoadIdl($pidl);
+ }
+
if ($opt_header) {
my($header) = util::ChangeExtension($output, ".h");
util::FileSave($header, IdlHeader::Parse($pidl));
diff --git a/source4/build/pidl/typelist.pm b/source4/build/pidl/typelist.pm
index 66a8a41dd2..f1ece68d8d 100644
--- a/source4/build/pidl/typelist.pm
+++ b/source4/build/pidl/typelist.pm
@@ -132,6 +132,21 @@ sub mapType($)
die("Unknown type $dt->{DATA}->{TYPE}");
}
+sub LoadIdl($)
+{
+ my $idl = shift;
+
+ foreach my $x (@{$idl}) {
+ next if $x->{TYPE} ne "INTERFACE";
+ addType($x);
+ foreach my $y (@{$x->{DATA}}) {
+ addType($y) if (
+ $y->{TYPE} eq "TYPEDEF"
+ or $y->{TYPE} eq "DECLARE");
+ }
+ }
+}
+
RegisterPrimitives();