summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/ODL.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/ODL.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/ODL.pm22
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;
}