summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/NDR.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-10-14 19:57:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:44 -0500
commit8a58b806e90b177107cb6a21ab43a88ff8516ec8 (patch)
treee5e27d4e82d843392aeb1a52396ee9c1e2d154e8 /source4/pidl/lib/Parse/Pidl/NDR.pm
parent6f3caf73e13f32e5482d09b3fd2fbcf61ac88bc1 (diff)
downloadsamba-8a58b806e90b177107cb6a21ab43a88ff8516ec8.tar.gz
samba-8a58b806e90b177107cb6a21ab43a88ff8516ec8.tar.bz2
samba-8a58b806e90b177107cb6a21ab43a88ff8516ec8.zip
r11067: Support for [string] in the Ethereal parser generator
(This used to be commit 1d5db487bb4afffac13b0d0904aea6b8664b75a8)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/NDR.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm
index f975e07b15..73104758dd 100644
--- a/source4/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/NDR.pm
@@ -31,7 +31,7 @@ require Exporter;
use vars qw($VERSION);
$VERSION = '0.01';
@ISA = qw(Exporter);
-@EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred);
+@EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsString);
use strict;
use Parse::Pidl::Typelist qw(hasType getType);
@@ -654,6 +654,17 @@ sub GetPrevLevel($$)
return undef;
}
+sub ContainsString($)
+{
+ my ($e) = @_;
+
+ foreach my $l (@{$e->{LEVELS}}) {
+ return 1 if ($l->{TYPE} eq "ARRAY" and $l->{IS_ZERO_TERMINATED});
+ }
+
+ return 0;
+}
+
sub ContainsDeferred($$)
{
my ($e,$l) = @_;