From f598135c6b3dabd1435ea7eed5d8ab69dac97407 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 16 Oct 2005 23:47:09 +0000 Subject: r11105: Warn if conformant arrays are not at the end of a struct Support conformant [string] arrays Eliminate utf8string This breaks xattr binary compatibility with previous versions - is that a problem? (This used to be commit 7596c708ba6642473319a1b699a5a910a639e50d) --- source4/pidl/lib/Parse/Pidl/NDR.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/pidl/lib/Parse/Pidl/NDR.pm') diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 73104758dd..d0b6708bf6 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -373,7 +373,12 @@ sub ParseStruct($) foreach my $x (@{$struct->{ELEMENTS}}) { - push @elements, ParseElement($x); + my $e = ParseElement($x); + if ($x != $struct->{ELEMENTS}[-1] and + $e->{LEVELS}[0]->{IS_SURROUNDING}) { + print "$x->{FILE}:$x->{LINE}: error: conformant member not at end of struct\n"; + } + push @elements, $e; } my $e = $elements[-1]; -- cgit