summaryrefslogtreecommitdiff
path: root/source4/build/pidl/ndr.pm
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-05-30 09:07:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:16 -0500
commit2a20e42c2637a6d53d74f3c68a4f420f8cb77a27 (patch)
treecec1b76d704f47c085b4a1f645350b0e6848e7f2 /source4/build/pidl/ndr.pm
parent9ab8ed3bab065afb0ba98277b7e4728b24caabe0 (diff)
downloadsamba-2a20e42c2637a6d53d74f3c68a4f420f8cb77a27.tar.gz
samba-2a20e42c2637a6d53d74f3c68a4f420f8cb77a27.tar.bz2
samba-2a20e42c2637a6d53d74f3c68a4f420f8cb77a27.zip
r7098: - make use of the NDR table instead of the IDL table in the client and server generation
- add 'noid' property to allow functions to be not present in the function table, and not generate client and server functions for them - print out a warning about [id()] not being correctly supported yet metze (This used to be commit 189730d1430e7f728d62dd5dc52f2a90c1a556d7)
Diffstat (limited to 'source4/build/pidl/ndr.pm')
-rw-r--r--source4/build/pidl/ndr.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm
index aa1a557dd1..5fafab3cd0 100644
--- a/source4/build/pidl/ndr.pm
+++ b/source4/build/pidl/ndr.pm
@@ -445,11 +445,17 @@ sub ParseFunction($$$)
my $opnum = shift;
my @elements = ();
my $rettype = undef;
+ my $thisopnum = undef;
CheckPointerTypes($d,
$ndr->{PROPERTIES}->{pointer_default_top}
);
+ if (not defined($d->{PROPERTIES}{noid})) {
+ $thisopnum = ${$opnum};
+ ${$opnum}++;
+ }
+
foreach my $x (@{$d->{ELEMENTS}}) {
my $e = ParseElement($x);
if (util::has_property($x, "in")) {
@@ -470,7 +476,7 @@ sub ParseFunction($$$)
return {
NAME => $d->{NAME},
TYPE => "FUNCTION",
- OPNUM => $opnum,
+ OPNUM => $thisopnum,
RETURN_TYPE => $rettype,
PROPERTIES => $d->{PROPERTIES},
ELEMENTS => \@elements
@@ -526,8 +532,7 @@ sub ParseInterface($)
}
if ($d->{TYPE} eq "FUNCTION") {
- push (@functions, ParseFunction($idl, $d, $opnum));
- $opnum+=1;
+ push (@functions, ParseFunction($idl, $d, \$opnum));
}
if ($d->{TYPE} eq "CONST") {