diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-07-19 19:00:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:44 -0500 |
commit | d99d06d954321331f8558da8604e1fd4dd956d13 (patch) | |
tree | 052e242ee7d61e658d6ec78b216587143f06565d /source4/build/pidl/Parse/Pidl/NDR.pm | |
parent | 8f16aa6c179a6157a4fbece3b30ef6ebfb3f5562 (diff) | |
download | samba-d99d06d954321331f8558da8604e1fd4dd956d13.tar.gz samba-d99d06d954321331f8558da8604e1fd4dd956d13.tar.bz2 samba-d99d06d954321331f8558da8604e1fd4dd956d13.zip |
r8612: Parse::Pidl::NDR:
Values that are deferred but don't contain deferred data don't
need NDR_BUFFERS
Parse::Pidl::Samba::NDR::Parser:
Only use manually written array access functions when the array
functions are faster then the autogenerated ones. Makes ndr_basic.c
a bit shorter.
(This used to be commit cad40815dcfb7cdcab13bd0cd204ef8711605ef3)
Diffstat (limited to 'source4/build/pidl/Parse/Pidl/NDR.pm')
-rw-r--r-- | source4/build/pidl/Parse/Pidl/NDR.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/build/pidl/Parse/Pidl/NDR.pm b/source4/build/pidl/Parse/Pidl/NDR.pm index 0c2b00539d..33d7839a3a 100644 --- a/source4/build/pidl/Parse/Pidl/NDR.pm +++ b/source4/build/pidl/Parse/Pidl/NDR.pm @@ -9,7 +9,7 @@ package Parse::Pidl::NDR; require Exporter; @ISA = qw(Exporter); -@EXPORT = qw(GetPrevLevel GetNextLevel); +@EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred); use strict; use Parse::Pidl::Typelist qw(hasType getType); @@ -195,7 +195,6 @@ sub GetElementLevelTable($) nonfatal($e, "string() attribute on non-array element"); } - push (@$order, { TYPE => "DATA", DATA_TYPE => $e->{TYPE}, @@ -216,13 +215,13 @@ sub can_contain_deferred { my $e = shift; - return 1 if ($e->{POINTERS}); return 0 if (Parse::Pidl::Typelist::is_scalar($e->{TYPE})); return 1 unless (hasType($e->{TYPE})); # assume the worst my $type = getType($e->{TYPE}); foreach my $x (@{$type->{DATA}->{ELEMENTS}}) { + return 1 if ($x->{POINTERS}); return 1 if (can_contain_deferred ($x)); } |