summaryrefslogtreecommitdiff
path: root/pidl/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-21 02:20:14 +0200
committerStefan Metzmacher <metze@samba.org>2011-03-10 14:31:16 +0100
commiteaa7ecdda7938e12db94f5ecbb978e5e7bca5f16 (patch)
tree7189bbdf355986dd565594682362577dc0bcb2e4 /pidl/lib
parent7d451838b978b7a88bc45a9fc878b99af59be7c3 (diff)
downloadsamba-eaa7ecdda7938e12db94f5ecbb978e5e7bca5f16.tar.gz
samba-eaa7ecdda7938e12db94f5ecbb978e5e7bca5f16.tar.bz2
samba-eaa7ecdda7938e12db94f5ecbb978e5e7bca5f16.zip
pidl/NDR: add ContainsPipe() function
metze
Diffstat (limited to 'pidl/lib')
-rw-r--r--pidl/lib/Parse/Pidl/NDR.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index 5ade5c175a..7b1e007831 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -34,7 +34,7 @@ require Exporter;
use vars qw($VERSION);
$VERSION = '0.01';
@ISA = qw(Exporter);
-@EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsString);
+@EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsPipe ContainsString);
@EXPORT_OK = qw(GetElementLevelTable ParseElement ValidElement align_type mapToScalar ParseType can_contain_deferred is_charset_array);
use strict;
@@ -853,6 +853,20 @@ sub ContainsDeferred($$)
return 0;
}
+sub ContainsPipe($$)
+{
+ my ($e,$l) = @_;
+
+ return 1 if ($l->{TYPE} eq "PIPE");
+
+ while ($l = GetNextLevel($e,$l))
+ {
+ return 1 if ($l->{TYPE} eq "PIPE");
+ }
+
+ return 0;
+}
+
sub el_name($)
{
my $e = shift;