Change 27452 by [EMAIL PROTECTED] on 2006/03/09 22:01:28
Superior *printf-foo lets us avoid modifying source code.
Affected files ...
... //depot/perl/toke.c#657 edit
Differences ...
==== //depot/perl/toke.c#657 (text) ====
Index: perl/toke.c
--- perl/toke.c#656~27450~ 2006-03-09 13:24:04.000000000 -0800
+++ perl/toke.c 2006-03-09 14:01:28.000000000 -0800
@@ -1089,15 +1089,10 @@
if ((t = strchr(s, '(')) && t < PL_bufptr)
return;
- /* XXX Things like this are just so nasty. We shouldn't be modifying
- source code, even if we realquick set it back. */
if (ckWARN_d(WARN_AMBIGUOUS)){
- const char ch = *s;
- *s = '\0';
Perl_warner(aTHX_ packWARN(WARN_AMBIGUOUS),
- "Warning: Use of \"%s\" without parentheses is ambiguous",
- PL_last_uni);
- *s = ch;
+ "Warning: Use of \"%.*s\" without parentheses is ambiguous",
+ (int)(s - PL_last_uni), PL_last_uni);
}
}
End of Patch.