diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-02-20 21:45:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:49 -0500 |
commit | 0dd7f645a4d6a1c7cc6a5fb1f82d12546dd5a40c (patch) | |
tree | a69c6c9076ea576b670e1c3b892600132a4673b0 /source4 | |
parent | d3996e944dfc0580300a3c4b460775e93dd62bc0 (diff) | |
download | samba-0dd7f645a4d6a1c7cc6a5fb1f82d12546dd5a40c.tar.gz samba-0dd7f645a4d6a1c7cc6a5fb1f82d12546dd5a40c.tar.bz2 samba-0dd7f645a4d6a1c7cc6a5fb1f82d12546dd5a40c.zip |
r5477: - Move some more of the typelist stuff out of ndr.pm
- Remember INTERFACEs as well (they can be types in DCOM)
(This used to be commit d914cd1804636eb1a34805d48c18e016835e973b)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/pidl/ndr.pm | 1 | ||||
-rwxr-xr-x | source4/build/pidl/pidl.pl | 5 | ||||
-rw-r--r-- | source4/build/pidl/typelist.pm | 15 |
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(); |