summaryrefslogtreecommitdiff
path: root/pidl/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-22 03:21:10 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-22 03:21:10 +0100
commit7ebc7e677d3d2a70c832a672e9f2e6b12896354f (patch)
treed12d93ccf5dafb7fda334529cdf7994ae4b7e06e /pidl/lib
parent2c58c9497cb6a15d03626864585f0437949ee6f6 (diff)
downloadsamba-7ebc7e677d3d2a70c832a672e9f2e6b12896354f.tar.gz
samba-7ebc7e677d3d2a70c832a672e9f2e6b12896354f.tar.bz2
samba-7ebc7e677d3d2a70c832a672e9f2e6b12896354f.zip
pidl: Allow location argument to warning() and error() to be undef, in case it is
not known.
Diffstat (limited to 'pidl/lib')
-rw-r--r--pidl/lib/Parse/Pidl.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl.pm b/pidl/lib/Parse/Pidl.pm
index c2c9463d03..40e3673908 100644
--- a/pidl/lib/Parse/Pidl.pm
+++ b/pidl/lib/Parse/Pidl.pm
@@ -20,13 +20,19 @@ $VERSION = '0.02';
sub warning
{
my ($l,$m) = @_;
- print STDERR "$l->{FILE}:$l->{LINE}: warning: $m\n";
+ if ($l) {
+ print STDERR "$l->{FILE}:$l->{LINE}: ";
+ }
+ print STDERR "warning: $m\n";
}
sub error
{
my ($l,$m) = @_;
- print STDERR "$l->{FILE}:$l->{LINE}: error: $m\n";
+ if ($l) {
+ print STDERR "$l->{FILE}:$l->{LINE}: ";
+ }
+ print STDERR "error: $m\n";
}
sub fatal($$)