diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-11-06 21:54:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:24:57 -0500 |
commit | d8ecabe452f36302105c6412ae5ab93cabfe5cf2 (patch) | |
tree | d5f8e1c8d246e6a95a5aa91e1776047104f046f0 /source4/pidl/lib/Parse/Pidl/ODL.pm | |
parent | 6317ba1cf71faa7b77072649d92205a38f800fd1 (diff) | |
download | samba-d8ecabe452f36302105c6412ae5ab93cabfe5cf2.tar.gz samba-d8ecabe452f36302105c6412ae5ab93cabfe5cf2.tar.bz2 samba-d8ecabe452f36302105c6412ae5ab93cabfe5cf2.zip |
r19585: Add support for some more standard IDL instructions:
- `include' (replaces helper())
- `import' (replaces depends())
Add support for parsing importlib() - importlib() is now ignored (with a
warning), but no longer causes syntax errors.
helper() and depends() are now marked deprecated and will cause warnings.
(This used to be commit 1ccab71cb8a9e3db9448b6679d01ad00e1c1e9a3)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/ODL.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/ODL.pm | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/ODL.pm b/source4/pidl/lib/Parse/Pidl/ODL.pm index c8d1de3d43..ee8d030a37 100644 --- a/source4/pidl/lib/Parse/Pidl/ODL.pm +++ b/source4/pidl/lib/Parse/Pidl/ODL.pm @@ -18,6 +18,7 @@ sub get_interface($$) my($if,$n) = @_; foreach(@$if) { + next if ($_->{TYPE} ne "INTERFACE"); return $_ if($_->{NAME} eq $n); } @@ -62,8 +63,10 @@ sub ReplaceInterfacePointers($) sub ODL2IDL($) { my $odl = shift; - - foreach my $x (@{$odl}) { + my $addedorpc = 0; + + foreach my $x (@$odl) { + next if ($x->{TYPE} ne "INTERFACE"); # Add [in] ORPCTHIS *this, [out] ORPCTHAT *that # and replace interfacepointers with MInterfacePointer # for 'object' interfaces @@ -72,13 +75,7 @@ sub ODL2IDL($) ($e->{TYPE} eq "FUNCTION") && FunctionAddObjArgs($e); ReplaceInterfacePointers($e); } - # Object interfaces use ORPC - my @depends = (); - if(has_property($x, "depends")) { - @depends = split /,/, $x->{PROPERTIES}->{depends}; - } - push @depends, "orpc"; - $x->{PROPERTIES}->{depends} = join(',',@depends); + $addedorpc = 1; } if ($x->{BASE}) { @@ -92,6 +89,13 @@ sub ODL2IDL($) } } + unshift (@$odl, { + TYPE => "IMPORT", + PATHS => [ "\"orpc.idl\"" ], + FILE => undef, + LINE => undef + }) if ($addedorpc); + return $odl; } |