diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-07 19:03:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:48 -0500 |
commit | ecf2c1effb778a95fd863a5e87ec7e378d228b57 (patch) | |
tree | 8b94782e07399490d6390e066c557af8c04aefc1 /source4/pidl/lib/Parse/Pidl/NDR.pm | |
parent | 2811e18da0d8dae2e2560c11a28450ae8b2a98d5 (diff) | |
download | samba-ecf2c1effb778a95fd863a5e87ec7e378d228b57.tar.gz samba-ecf2c1effb778a95fd863a5e87ec7e378d228b57.tar.bz2 samba-ecf2c1effb778a95fd863a5e87ec7e378d228b57.zip |
r21222: Merge a couple of pidl fixes:
* Pidl will now warn when trying to use pointers as integers in expressions.
* "subcontext()" is now marked as deprecated. The alternatives,
transmit_as() / represent_as() should be available soon.
* More tests.
* Remove some unused code in smbtorture.
(This used to be commit 37c0da541e3962164d5af3e3c9560803a733f3b7)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/NDR.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/NDR.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 462e577cdd..2ba8461e4a 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -35,7 +35,7 @@ use vars qw($VERSION); $VERSION = '0.01'; @ISA = qw(Exporter); @EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsString); -@EXPORT_OK = qw(GetElementLevelTable ParseElement); +@EXPORT_OK = qw(GetElementLevelTable ParseElement ValidElement); use strict; use Parse::Pidl qw(warning fatal); @@ -902,7 +902,6 @@ sub ValidElement($) } } - if (has_property($e, "subcontext") and has_property($e, "represent_as")) { fatal($e, el_name($e) . " : subcontext() and represent_as() can not be used on the same element"); } @@ -919,6 +918,10 @@ sub ValidElement($) fatal($e, el_name($e) . " : represent_as() and value() can not be used on the same element"); } + if (has_property($e, "subcontext")) { + warning($e, "subcontext() is deprecated. Use represent_as() or transmit_as() instead"); + } + if (defined (has_property($e, "subcontext_size")) and not defined(has_property($e, "subcontext"))) { fatal($e, el_name($e) . " : subcontext_size() on non-subcontext element"); } |