diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-05 18:34:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:57 -0500 |
commit | 631aa1f0efa75924c4d8ba639de80527fb8da7b5 (patch) | |
tree | 6b6e0f16c6f5d1ec96cff1344973808c86311898 /source4/build/pidl/ndr.pm | |
parent | df036e08294ec98a2c7049f7f2fe03de1fd2ae44 (diff) | |
download | samba-631aa1f0efa75924c4d8ba639de80527fb8da7b5.tar.gz samba-631aa1f0efa75924c4d8ba639de80527fb8da7b5.tar.bz2 samba-631aa1f0efa75924c4d8ba639de80527fb8da7b5.zip |
r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :
type *name[];
rather then :
type *name;
which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
(This used to be commit a416de5825c540fd3741731c4be05e9a659a6fdb)
Diffstat (limited to 'source4/build/pidl/ndr.pm')
-rw-r--r-- | source4/build/pidl/ndr.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index 8a654f7165..6af3aa852d 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -291,6 +291,8 @@ sub ParseExpr($$$) my $e2 = util::find_sibling($e, $size); + die("Invalid sibling '$size'") unless defined($e2); + if (util::has_property($e2, "in") && util::has_property($e2, "out")) { return $prefix . "$var_prefix$size"; } @@ -460,6 +462,7 @@ sub ParseArrayPrint($$) my $e = shift; my $var_prefix = shift; my $size = ParseExpr($e, util::array_size($e), $var_prefix); + my $ptr_prefix = c_ptr_prefix($e); if (is_varying_array($e)) { $size = ParseExpr($e, util::has_property($e, "length_is"), $var_prefix); |