Author: metze
Date: 2007-08-17 12:55:47 +0000 (Fri, 17 Aug 2007)
New Revision: 24517

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24517

Log:
move skipping pointer before an array logic into the
pointer loop as we do in other places

metze
Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm      
2007-08-17 12:04:41 UTC (rev 24516)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm      
2007-08-17 12:55:47 UTC (rev 24517)
@@ -10,7 +10,7 @@
 use Parse::Pidl qw(fatal);
 use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
 use Parse::Pidl::Util qw(has_property is_constant);
-use Parse::Pidl::NDR qw(GetPrevLevel);
+use Parse::Pidl::NDR qw(GetNextLevel);
 use Parse::Pidl::Samba4 qw(is_intree);
 
 use vars qw($VERSION);
@@ -68,6 +68,10 @@
                my $numstar = 0;
                foreach my $l (@{$element->{LEVELS}}) {
                        next unless ($l->{TYPE} eq "POINTER");
+
+                       my $nl = GetNextLevel($element, $l);
+                       next if (defined($nl) and $nl->{TYPE} eq "ARRAY");
+
                        $numstar++;
                }
                if ($numstar >= 1) {
@@ -77,8 +81,6 @@
                        next unless ($l->{TYPE} eq "ARRAY");
                        next if ($l->{IS_FIXED}) and
                                not has_property($element, "charset");
-                       my $pl = GetPrevLevel($element, $l);
-                       next if (defined($pl) and $pl->{TYPE} eq "POINTER");
                        $numstar++;
                }
                pidl "*" foreach (1..$numstar);

Reply via email to