summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-12 01:22:23 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-12 01:22:23 +0100
commit87fc0a43915fcdce3ac8deea50f3fafffaa42c37 (patch)
tree1e4c79ce42795fad1d0d4655d405254396fdc547 /source4/pidl
parent236a780baa959236ff7879d109fa8ba5b067dc88 (diff)
downloadsamba-87fc0a43915fcdce3ac8deea50f3fafffaa42c37.tar.gz
samba-87fc0a43915fcdce3ac8deea50f3fafffaa42c37.tar.bz2
samba-87fc0a43915fcdce3ac8deea50f3fafffaa42c37.zip
pidl: Remove support for the declare keyword in other parts of the pidl code.
(This used to be commit 2fe013f715bdee6c01a833bc6c883e830bdc5dfd)
Diffstat (limited to 'source4/pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Compat.pm7
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm10
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Typelist.pm5
5 files changed, 5 insertions, 21 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Compat.pm b/source4/pidl/lib/Parse/Pidl/Compat.pm
index f1241ef341..7939bb2df2 100644
--- a/source4/pidl/lib/Parse/Pidl/Compat.pm
+++ b/source4/pidl/lib/Parse/Pidl/Compat.pm
@@ -152,13 +152,6 @@ sub CheckInterface($)
$if->{PROPERTIES}->{pointer_default_top} ne "ref") {
warning($if, "pointer_default_top() is pidl-specific");
}
-
- foreach my $x (@{$if->{DATA}}) {
- if ($x->{TYPE} eq "DECLARE") {
- warning($if, "the declare keyword is pidl-specific");
- next;
- }
- }
}
sub Check($)
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm
index f624d2bdc0..8e7cf40d90 100644
--- a/source4/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/NDR.pm
@@ -287,8 +287,6 @@ sub can_contain_deferred($)
return 0 if (Parse::Pidl::Typelist::is_scalar($type));
- return 1 if ($type->{TYPE} eq "DECLARE"); # assume the worst
-
return can_contain_deferred($type->{DATA}) if ($type->{TYPE} eq "TYPEDEF");
return 0 unless defined($type->{ELEMENTS});
@@ -362,7 +360,7 @@ sub align_type($)
my $dt = getType($e);
- if ($dt->{TYPE} eq "TYPEDEF" or $dt->{TYPE} eq "DECLARE") {
+ if ($dt->{TYPE} eq "TYPEDEF") {
return align_type($dt->{DATA});
} elsif ($dt->{TYPE} eq "ENUM") {
return align_type(Parse::Pidl::Typelist::enum_type_fn($dt));
@@ -650,7 +648,6 @@ sub ParseInterface($)
my @consts = ();
my @functions = ();
my @endpoints;
- my @declares = ();
my $opnum = 0;
my $version;
@@ -667,9 +664,7 @@ sub ParseInterface($)
}
foreach my $d (@{$idl->{DATA}}) {
- if ($d->{TYPE} eq "DECLARE") {
- push (@declares, $d);
- } elsif ($d->{TYPE} eq "FUNCTION") {
+ if ($d->{TYPE} eq "FUNCTION") {
push (@functions, ParseFunction($idl, $d, \$opnum));
} elsif ($d->{TYPE} eq "CONST") {
push (@consts, ParseConst($idl, $d));
@@ -701,7 +696,6 @@ sub ParseInterface($)
FUNCTIONS => \@functions,
CONSTS => \@consts,
TYPES => \@types,
- DECLARES => \@declares,
ENDPOINTS => \@endpoints
};
}
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm b/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
index 36cc469ff6..fa0c97961c 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
@@ -860,7 +860,7 @@ sub TypeFunctionName($$)
my ($prefix, $t) = @_;
return "$prefix\_$t->{NAME}" if (ref($t) eq "HASH" and
- ($t->{TYPE} eq "TYPEDEF" or $t->{TYPE} eq "DECLARE"));
+ $t->{TYPE} eq "TYPEDEF");
return "$prefix\_$t->{TYPE}_$t->{NAME}" if (ref($t) eq "HASH");
return "$prefix\_$t";
}
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index a261910c17..abbfe2259b 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2723,7 +2723,7 @@ sub TypeFunctionName($$)
my ($prefix, $t) = @_;
return "$prefix\_$t->{NAME}" if (ref($t) eq "HASH" and
- ($t->{TYPE} eq "TYPEDEF" or $t->{TYPE} eq "DECLARE"));
+ $t->{TYPE} eq "TYPEDEF");
return "$prefix\_$t->{TYPE}_$t->{NAME}" if (ref($t) eq "HASH");
return "$prefix\_$t";
}
diff --git a/source4/pidl/lib/Parse/Pidl/Typelist.pm b/source4/pidl/lib/Parse/Pidl/Typelist.pm
index b2069c784b..8fb7448070 100644
--- a/source4/pidl/lib/Parse/Pidl/Typelist.pm
+++ b/source4/pidl/lib/Parse/Pidl/Typelist.pm
@@ -138,8 +138,7 @@ sub is_scalar($)
return 1 if (ref($type) eq "HASH" and $type->{TYPE} eq "SCALAR");
if (my $dt = getType($type)) {
- return is_scalar($dt->{DATA}) if ($dt->{TYPE} eq "TYPEDEF" or
- $dt->{TYPE} eq "DECLARE");
+ return is_scalar($dt->{DATA}) if ($dt->{TYPE} eq "TYPEDEF");
return 1 if ($dt->{TYPE} eq "SCALAR" or $dt->{TYPE} eq "ENUM" or
$dt->{TYPE} eq "BITMAP");
}
@@ -214,7 +213,6 @@ sub mapType($$)
my ($t, $n) = @_;
return mapType($t->{DATA}, $n) if ($t->{TYPE} eq "TYPEDEF");
- return mapType($t->{DATA}, $n) if ($t->{TYPE} eq "DECLARE");
return mapScalarType($n) if ($t->{TYPE} eq "SCALAR");
return "enum $n" if ($t->{TYPE} eq "ENUM");
return "struct $n" if ($t->{TYPE} eq "STRUCT");
@@ -248,7 +246,6 @@ sub LoadIdl($)
foreach my $y (@{$x->{DATA}}) {
addType($y) if (
$y->{TYPE} eq "TYPEDEF"
- or $y->{TYPE} eq "DECLARE"
or $y->{TYPE} eq "UNION"
or $y->{TYPE} eq "STRUCT"
or $y->{TYPE} eq "ENUM"