git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c58c94
)
pidl: Allow location argument to warning() and error() to be undef, in case it is
author
Jelmer Vernooij
<jelmer@samba.org>
Mon, 22 Dec 2008 02:21:10 +0000
(
03:21
+0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Mon, 22 Dec 2008 02:21:10 +0000
(
03:21
+0100)
not known.
pidl/lib/Parse/Pidl.pm
patch
|
blob
|
history
diff --git
a/pidl/lib/Parse/Pidl.pm
b/pidl/lib/Parse/Pidl.pm
index c2c9463d03f9445b65dc27913b53ff18d954c897..40e3673908e0c54d680ec3667a6cec5083b0c93e 100644
(file)
--- 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($$)