diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-04-24 09:40:58 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-24 09:40:58 +0000 |
commit | 19f6321d25d193c964d4da055e9f739f63de1dc6 (patch) | |
tree | c15eea4f79f7270342f62e1d8ce4a99246afb5eb /sv.c | |
parent | b3f24c00097febc1ee3ecdb31ce34c3df610cbd2 (diff) | |
download | perl-19f6321d25d193c964d4da055e9f739f63de1dc6.tar.gz |
Following change 27942 it's clear that the return type of
glob_2inpuv_number() should change. Rename it and glob_2inpuv() to
reflect what they do.
p4raw-id: //depot/perl@27947
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1717,8 +1717,8 @@ Perl_looks_like_number(pTHX_ SV *sv) return grok_number(sbegin, len, NULL); } -STATIC char * -S_glob_2inpuv_number(pTHX_ GV * const gv) +STATIC bool +S_glob_2number(pTHX_ GV * const gv) { const U32 wasfake = SvFLAGS(gv) & SVf_FAKE; SV *const buffer = sv_newmortal(); @@ -1735,11 +1735,11 @@ S_glob_2inpuv_number(pTHX_ GV * const gv) not_a_number(buffer); /* We just want something true to return, so that S_sv_2iuv_common can tail call us and return true. */ - return (char *) 1; + return TRUE; } STATIC char * -S_glob_2inpuv(pTHX_ GV * const gv, STRLEN * const len) +S_glob_2pv(pTHX_ GV * const gv, STRLEN * const len) { const U32 wasfake = SvFLAGS(gv) & SVf_FAKE; SV *const buffer = sv_newmortal(); @@ -2123,7 +2123,7 @@ S_sv_2iuv_common(pTHX_ SV *sv) { } else { if (isGV_with_GP(sv)) - return (bool)PTR2IV(glob_2inpuv_number((GV *)sv)); + return PTR2IV(glob_2number((GV *)sv)); if (!(SvFLAGS(sv) & SVs_PADTMP)) { if (!PL_localizing && ckWARN(WARN_UNINITIALIZED)) @@ -2473,7 +2473,7 @@ Perl_sv_2nv(pTHX_ register SV *sv) } else { if (isGV_with_GP(sv)) { - glob_2inpuv_number((GV *)sv); + glob_2number((GV *)sv); return 0.0; } @@ -2810,7 +2810,7 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags) } else { if (isGV_with_GP(sv)) - return glob_2inpuv((GV *)sv, lp); + return glob_2pv((GV *)sv, lp); if (!PL_localizing && !(SvFLAGS(sv) & SVs_PADTMP) && ckWARN(WARN_UNINITIALIZED)) report_uninit(sv); |