diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-15 07:49:03 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-15 07:49:03 +0000 |
commit | 5a28ca7bf3250f951826aa0726e4487b88062abe (patch) | |
tree | e59602931956fa85755bb53241719aba6d71f4bd /source4/build/pidl/parser.pm | |
parent | ba5a060136145abdfa4915fe0fecc4afe1180627 (diff) | |
download | samba-5a28ca7bf3250f951826aa0726e4487b88062abe.tar.gz samba-5a28ca7bf3250f951826aa0726e4487b88062abe.tar.bz2 samba-5a28ca7bf3250f951826aa0726e4487b88062abe.zip |
support a new value() attribute that allows us to auto-fill certain
elements. Used at the moment for string lengths.
the regular expression isn't right, but it works for the case I need.
Perl expert needed :)
(This used to be commit c7ddd6b2aadeb3bbd2ad520a9e074866b434cbba)
Diffstat (limited to 'source4/build/pidl/parser.pm')
-rw-r--r-- | source4/build/pidl/parser.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index ec747f33b5..d85a15eb00 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -168,7 +168,9 @@ sub ParseElementPushScalar($$$) my($ndr_flags) = shift; my $cprefix = util::c_push_prefix($e); - if (defined $e->{VALUE}) { + if (my $value = util::has_property($e, "value")) { + $res .= "\tNDR_CHECK(ndr_push_$e->{TYPE}(ndr, $value));\n"; + } elsif (defined $e->{VALUE}) { $res .= "\tNDR_CHECK(ndr_push_$e->{TYPE}(ndr, $e->{VALUE}));\n"; } elsif (util::need_wire_pointer($e)) { $res .= "\tNDR_CHECK(ndr_push_ptr(ndr, $var_prefix$e->{NAME}));\n"; |