X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=toke.c;h=dcb44541e8d8dd68f6f5101800e6f2c02a659c47;hb=7f2c89897f1cc260c9f4949731056784f989703f;hp=2e6120d73150881357b111f628786994ef85e29d;hpb=55eb892c8d1c2d0317b54696f56f6afb30a62cd1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/toke.c b/toke.c index 2e6120d..dcb4454 100644 --- a/toke.c +++ b/toke.c @@ -3958,7 +3958,8 @@ Perl_yylex(pTHX) s += 2; d = s; s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len); - tmp = keyword(PL_tokenbuf, len); + if (!(tmp = keyword(PL_tokenbuf, len))) + Perl_croak(aTHX_ "CORE::%s is not a keyword", PL_tokenbuf); if (tmp < 0) tmp = -tmp; goto reserved_word; @@ -6982,9 +6983,9 @@ Perl_scan_num(pTHX_ char *start) UV uv; errno = 0; if (*PL_tokenbuf == '-') - iv = Atol(PL_tokenbuf); + iv = Strtol(PL_tokenbuf, (char**)NULL, 10); else - uv = Atoul(PL_tokenbuf); + uv = Strtoul(PL_tokenbuf, (char**)NULL, 10); if (errno) floatit = TRUE; /* probably just too large */ else if (*PL_tokenbuf == '-') @@ -6993,14 +6994,9 @@ Perl_scan_num(pTHX_ char *start) sv_setuv(sv, uv); } if (floatit) { - char *tp; - errno = 0; value = Atof(PL_tokenbuf); - if (errno) - Perl_die(aTHX_ "unparseable float"); - else - sv_setnv(sv, value); - } + sv_setnv(sv, value); + } #endif if ( floatit ? (PL_hints & HINT_NEW_FLOAT) : (PL_hints & HINT_NEW_INTEGER) )