1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r5477: - Move some more of the typelist stuff out of ndr.pm

- Remember INTERFACEs as well (they can be types in DCOM)
This commit is contained in:
Jelmer Vernooij 2005-02-20 21:45:51 +00:00 committed by Gerald (Jerry) Carter
parent 75d8fc8338
commit d914cd1804
3 changed files with 20 additions and 1 deletions

View File

@ -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});
}

View File

@ -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));

View File

@ -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();