summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-05 20:52:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:01 -0500
commita7bc3801f94891880a90b2974dfbadc9e9f8c2ee (patch)
tree2cc690d4b35022398e8062847f70982fd34585e0 /source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
parent38ba8bf8ba75c19ab8d34eb4862b05befc8e1497 (diff)
downloadsamba-a7bc3801f94891880a90b2974dfbadc9e9f8c2ee.tar.gz
samba-a7bc3801f94891880a90b2974dfbadc9e9f8c2ee.tar.bz2
samba-a7bc3801f94891880a90b2974dfbadc9e9f8c2ee.zip
r20567: Print proper errors with filename and line numbers in ParseExpr()
(This used to be commit f5dc1b47ecf18068a47f8f68016463ef4a55dc03)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm b/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
index bc8d27a283..a3e8d3470b 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
@@ -72,7 +72,7 @@ sub ParserElement($$$)
if (has_property($e, "charset")) {
fatal($e,"charset() on non-array element") unless (defined($e->{ARRAY_LEN}) and scalar(@{$e->{ARRAY_LEN}}) > 0);
- my $len = ParseExpr(@{$e->{ARRAY_LEN}}[0], $env);
+ my $len = ParseExpr(@{$e->{ARRAY_LEN}}[0], $env, $e);
if ($len eq "*") { $len = "-1"; }
$name = ", mem_ctx" if ($t eq "pull");
pidl "TDR_CHECK(tdr_$t\_charset(tdr$name, &v->$e->{NAME}, $len, sizeof($e->{TYPE}_t), CH_$e->{PROPERTIES}->{charset}));";
@@ -80,11 +80,11 @@ sub ParserElement($$$)
}
if (has_property($e, "switch_is")) {
- $switch = ", " . ParseExpr($e->{PROPERTIES}->{switch_is}, $env);
+ $switch = ", " . ParseExpr($e->{PROPERTIES}->{switch_is}, $env, $e);
}
if (defined($e->{ARRAY_LEN}) and scalar(@{$e->{ARRAY_LEN}}) > 0) {
- my $len = ParseExpr($e->{ARRAY_LEN}[0], $env);
+ my $len = ParseExpr($e->{ARRAY_LEN}[0], $env, $e);
if ($t eq "pull" and not is_constant($len)) {
pidl "TDR_ALLOC(mem_ctx, v->$e->{NAME}, $len);";
@@ -101,7 +101,7 @@ sub ParserElement($$$)
}
if (has_property($e, "value") && $t eq "push") {
- pidl "v->$e->{NAME} = ".ParseExpr($e->{PROPERTIES}->{value}, $env).";";
+ pidl "v->$e->{NAME} = ".ParseExpr($e->{PROPERTIES}->{value}, $env, $e).";";
}
pidl "TDR_CHECK(tdr_$t\_$e->{TYPE}(tdr$name$switch, &v->$e->{NAME}$array));";