summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-26 02:14:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:44 -0500
commitee10fb1a12391a76fe81e6e7a92d282ef885bc30 (patch)
tree24fe6a6f60024a1420a49e3e5b21c0e7c2b0708f /source4/pidl/lib/Parse/Pidl/Samba4
parent788f7cc59ab75467697a7145f9bcca6f8adaeeab (diff)
downloadsamba-ee10fb1a12391a76fe81e6e7a92d282ef885bc30.tar.gz
samba-ee10fb1a12391a76fe81e6e7a92d282ef885bc30.tar.bz2
samba-ee10fb1a12391a76fe81e6e7a92d282ef885bc30.zip
r12490: Fix --warn-compat
(This used to be commit ba6a767f1b3a14e076ebd049b4fdcffd64173523)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm17
1 files changed, 7 insertions, 10 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
index b9044078ea..83df9afe88 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
@@ -3,8 +3,8 @@
package Parse::Pidl::Samba4::COM::Header;
-use Parse::Pidl::Typelist;
-use Parse::Pidl::Util qw(has_property);
+use Parse::Pidl::Typelist qw(mapType);
+use Parse::Pidl::Util qw(has_property is_constant);
use vars qw($VERSION);
$VERSION = '0.01';
@@ -18,7 +18,7 @@ sub GetArgumentProtoList($)
foreach my $a (@{$f->{ELEMENTS}}) {
- $res .= ", " . Parse::Pidl::Typelist::mapType($a->{TYPE}) . " ";
+ $res .= ", " . mapType($a->{TYPE}) . " ";
my $l = $a->{POINTERS};
$l-- if (Parse::Pidl::Typelist::scalar_is_reference($a->{TYPE}));
@@ -26,13 +26,12 @@ sub GetArgumentProtoList($)
$res .= "*";
}
- if (defined $a->{ARRAY_LEN}[0] &&
- !Parse::Pidl::Util::is_constant($a->{ARRAY_LEN}[0]) &&
+ if (defined $a->{ARRAY_LEN}[0] && !is_constant($a->{ARRAY_LEN}[0]) &&
!$a->{POINTERS}) {
$res .= "*";
}
$res .= $a->{NAME};
- if (defined $a->{ARRAY_LEN}[0] && Parse::Pidl::Util::is_constant($a->{ARRAY_LEN}[0])) {
+ if (defined $a->{ARRAY_LEN}[0] && is_constant($a->{ARRAY_LEN}[0])) {
$res .= "[$a->{ARRAY_LEN}[0]]";
}
}
@@ -45,9 +44,7 @@ sub GetArgumentList($)
my $f = shift;
my $res = "";
- foreach my $a (@{$f->{ELEMENTS}}) {
- $res .= ", $a->{NAME}";
- }
+ foreach (@{$f->{ELEMENTS}}) { $res .= ", $_->{NAME}"; }
return $res;
}
@@ -65,7 +62,7 @@ sub HeaderVTable($)
my $data = $interface->{DATA};
foreach my $d (@{$data}) {
- $res .= "\t" . Parse::Pidl::Typelist::mapType($d->{RETURN_TYPE}) . " (*$d->{NAME}) (struct $interface->{NAME} *d, TALLOC_CTX *mem_ctx" . GetArgumentProtoList($d) . ");\\\n" if ($d->{TYPE} eq "FUNCTION");
+ $res .= "\t" . mapType($d->{RETURN_TYPE}) . " (*$d->{NAME}) (struct $interface->{NAME} *d, TALLOC_CTX *mem_ctx" . GetArgumentProtoList($d) . ");\\\n" if ($d->{TYPE} eq "FUNCTION");
}
$res .= "\n";
$res .= "struct $interface->{NAME}_vtable {\n";