From: Jarkko Hietaniemi Date: Wed, 24 Sep 2003 07:25:48 +0000 (+0000) Subject: A fix from Graham for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9ae0a2d3e1516a6a8b6fdb9d5354ef5912780c3;p=p5sagit%2Fp5-mst-13.2.git A fix from Graham for [perl #24012] Weird conversion issue with List::Util::sum on Linux/AMD 850MHz (seemingly a NV casting issue) p4raw-id: //depot/perl@21354 --- diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index 98c3758..744d8cd 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -47,9 +47,9 @@ my_cxinc(pTHX) #endif #ifdef SVf_IVisUV -# define slu_sv_value(sv) (NV)(SvIOK(sv) ? SvIOK_UV(sv) ? SvUVX(sv) : SvIVX(sv) : SvNV(sv)) +# define slu_sv_value(sv) (SvIOK(sv)) ? (SvIOK_UV(sv)) ? (NV)(SvUVX(sv)) : (NV)(SvIVX(sv)) : (SvNV(sv)) #else -# define slu_sv_value(sv) (NV)(SvIOK(sv) ? SvIVX(sv) : SvNV(sv)) +# define slu_sv_value(sv) (SvIOK(sv)) ? (NV)(SvIVX(sv)) : SvNV(sv) #endif #ifndef Drand01