From: Gurusamy Sarathy Date: Sun, 6 Dec 1998 14:38:59 +0000 (+0000) Subject: mention limit on line numbers reported by diagnostics X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a30ac1520b1f2865b12dda3a3ca7d9715cb02229;p=p5sagit%2Fp5-mst-13.2.git mention limit on line numbers reported by diagnostics p4raw-id: //depot/perl@2457 --- diff --git a/pod/perl.pod b/pod/perl.pod index 8bc94fa..1b886d0 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -298,7 +298,10 @@ and syswrite().) While none of the built-in data types have any arbitrary size limits (apart from memory size), there are still a few arbitrary limits: a -given variable name may not be longer than 251 characters. +given variable name may not be longer than 251 characters. Line numbers +displayed by diagnostics are internally stored as short integers, +so they are limited to a maximum of 65535 (higher numbers usually being +affected by wraparound). You may mail your bug reports (be sure to include full configuration information as output by the myconfig program in the perl source tree, diff --git a/toke.c b/toke.c index 090a56b..b1bd0d7 100644 --- a/toke.c +++ b/toke.c @@ -4964,7 +4964,6 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type) bool oldcatch = CATCH_GET; SV **cvp; SV *cv, *typesv; - char buf[128]; if (!table) { yyerror("%^H is not defined"); @@ -4972,6 +4971,7 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type) } cvp = hv_fetch(table, key, strlen(key), FALSE); if (!cvp || !SvOK(*cvp)) { + char buf[128]; sprintf(buf,"$^H{%s} is not defined", key); yyerror(buf); return sv; @@ -5017,6 +5017,7 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type) POPSTACK; if (!SvOK(res)) { + char buf[128]; sprintf(buf,"Call to &{$^H{%s}} did not return a defined value", key); yyerror(buf); }