diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-14 01:30:44 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-14 19:53:06 +0100 |
commit | 5d60cb6ef1c63ce771ab44b6831147568061aa50 (patch) | |
tree | cff090a954f9aa820c65ea9b11096f4b51e821b8 /source4/pidl/lib/Parse/Pidl/NDR.pm | |
parent | d8b21ae2534d5b51c1dc5a4c50b3de5ddb32af80 (diff) | |
download | samba-5d60cb6ef1c63ce771ab44b6831147568061aa50.tar.gz samba-5d60cb6ef1c63ce771ab44b6831147568061aa50.tar.bz2 samba-5d60cb6ef1c63ce771ab44b6831147568061aa50.zip |
pidl/python: Fix parsing arguments, fix more pointer issues.
(This used to be commit b00c1a072457e5083ffc24a8b74b3793d0b44eee)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/NDR.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/NDR.pm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 1d059ebdf7..fc6bfe4c96 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -35,7 +35,7 @@ use vars qw($VERSION); $VERSION = '0.01'; @ISA = qw(Exporter); @EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsString); -@EXPORT_OK = qw(GetElementLevelTable ParseElement ValidElement align_type mapToScalar ParseType can_contain_deferred); +@EXPORT_OK = qw(GetElementLevelTable ParseElement ValidElement align_type mapToScalar ParseType can_contain_deferred is_charset_array); use strict; use Parse::Pidl qw(warning fatal); @@ -1181,4 +1181,19 @@ sub Validate($) } } +sub is_charset_array($$) +{ + my ($e,$l) = @_; + + return 0 if ($l->{TYPE} ne "ARRAY"); + + my $nl = GetNextLevel($e,$l); + + return 0 unless ($nl->{TYPE} eq "DATA"); + + return has_property($e, "charset"); +} + + + 1; |