summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2003-02-12 03:12:43 +0000
committerhv <hv@crypt.org>2003-02-16 10:54:58 +0000
commit52a96ae66a5b0cd12cd52516c48cc6bf774e2038 (patch)
tree703b795570e644265d825f5e3d391df62f485b68 /op.c
parent35209cc889c47c22db67b1eb1f83d963b429057a (diff)
downloadperl-52a96ae66a5b0cd12cd52516c48cc6bf774e2038.tar.gz
restrict PERL_PRESERVE_IVUV to things that should really give an
integer, but extend to runtime. Based on: Subject: Re: [perl #20827] Unexpected scientific notation. Message-Id: <200302120312.h1C3ChS02613@crypt.compulink.co.uk> p4raw-id: //depot/perl@18720
Diffstat (limited to 'op.c')
-rw-r--r--op.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/op.c b/op.c
index 7cb7fad2c5..4cba2c584f 100644
--- a/op.c
+++ b/op.c
@@ -1942,19 +1942,7 @@ Perl_fold_constants(pTHX_ register OP *o)
op_free(o);
if (type == OP_RV2GV)
return newGVOP(OP_GV, 0, (GV*)sv);
- else {
- /* try to smush double to int, but don't smush -2.0 to -2 */
- if ((SvFLAGS(sv) & (SVf_IOK|SVf_NOK|SVf_POK)) == SVf_NOK &&
- type != OP_NEGATE)
- {
-#ifdef PERL_PRESERVE_IVUV
- /* Only bother to attempt to fold to IV if
- most operators will benefit */
- SvIV_please(sv);
-#endif
- }
- return newSVOP(OP_CONST, 0, sv);
- }
+ return newSVOP(OP_CONST, 0, sv);
nope:
return o;