svn commit: samba r25114 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl: .

metze at samba.org metze at samba.org
Wed Sep 12 12:31:21 GMT 2007


Author: metze
Date: 2007-09-12 12:31:19 +0000 (Wed, 12 Sep 2007)
New Revision: 25114

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

Log:
handle structs and unions without typedefs better
in can_contain_deffered()

jelmer: we need to handle this more genericly, I assume
        we have a lot of other related bugs

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


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm	2007-09-12 09:26:57 UTC (rev 25113)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm	2007-09-12 12:31:19 UTC (rev 25114)
@@ -288,9 +288,20 @@
 
 	return 1 if ($type->{TYPE} eq "DECLARE"); # assume the worst
 
-	foreach my $x (@{$type->{DATA}->{ELEMENTS}}) {
-		return 1 if ($x->{POINTERS});
-		return 1 if (can_contain_deferred ($x));
+	if ($type->{TYPE} eq "TYPEDEF") {
+		return 0 unless defined($type->{DATA}->{ELEMENTS});
+
+		foreach my $x (@{$type->{DATA}->{ELEMENTS}}) {
+			return 1 if ($x->{POINTERS});
+			return 1 if (can_contain_deferred ($x));
+		}
+	} else {
+		return 0 unless defined($type->{ELEMENTS});
+
+		foreach my $x (@{$type->{ELEMENTS}}) {
+			return 1 if ($x->{POINTERS});
+			return 1 if (can_contain_deferred ($x));
+		}
 	}
 	
 	return 0;



More information about the samba-cvs mailing list