diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-14 12:44:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:14 -0500 |
commit | e50dc79226bcb722485019533033500b0e145a46 (patch) | |
tree | ed0e6cc065511b73936ceaa418726f6549c6d816 /source4/pidl/lib/Parse/Pidl | |
parent | 86c5fe1990361ef35ebf1d71226ee0a63af9e999 (diff) | |
download | samba-e50dc79226bcb722485019533033500b0e145a46.tar.gz samba-e50dc79226bcb722485019533033500b0e145a46.tar.bz2 samba-e50dc79226bcb722485019533033500b0e145a46.zip |
r21332: Fix bug in pidl that prevented value(0) from working. Bug reported by metze.
(This used to be commit 8212a3b8e0d3d59264f659c3f657b165ececefeb)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 3b1bc726ff..045b243b2a 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -10,7 +10,8 @@ package Parse::Pidl::Samba4::NDR::Parser; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(is_charset_array); -@EXPORT_OK = qw(check_null_pointer GenerateFunctionInEnv GenerateFunctionOutEnv); +@EXPORT_OK = qw(check_null_pointer GenerateFunctionInEnv + GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv); use strict; use Parse::Pidl::Typelist qw(hasType getType mapType); @@ -234,7 +235,7 @@ sub EnvSubstituteValue($$) # Substitute the value() values in the env foreach my $e (@{$s->{ELEMENTS}}) { - next unless (my $v = has_property($e, "value")); + next unless (defined(my $v = has_property($e, "value"))); $env->{$e->{NAME}} = ParseExpr($v, $env, $e); } @@ -714,7 +715,7 @@ sub ParseElementPush($$$$$) start_flags($e); - if (my $value = has_property($e, "value")) { + if (defined(my $value = has_property($e, "value"))) { $var_name = ParseExpr($value, $env, $e->{ORIGINAL}); } @@ -765,7 +766,7 @@ sub ParseElementPrint($$$) $var_name = append_prefix($e, $var_name); - if (my $value = has_property($e, "value")) { + if (defined(my $value = has_property($e, "value"))) { $var_name = "(ndr->flags & LIBNDR_PRINT_SET_VALUES)?" . ParseExpr($value,$env, $e->{ORIGINAL}) . ":$var_name"; } |