summaryrefslogtreecommitdiff
path: root/ext/List/Util/Util.xs
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2005-11-09 00:09:48 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-11-09 11:56:04 +0000
commit4984adac51320d8981ecc689b43b2a997264c481 (patch)
tree017f0fea78e03e65f01b581912f52fdf7a35b69b /ext/List/Util/Util.xs
parent6b58708ba0b8d2e44d1ba2d0c16da2fae0767752 (diff)
downloadperl-4984adac51320d8981ecc689b43b2a997264c481.tar.gz
Re: [PATCH] Re: [perl #32383] DProf breaks List::Util::shuffle
Message-Id: <6CAD749E-AE29-415A-9ACB-BA8F6FB8279E@pobox.com> p4raw-id: //depot/perl@26062
Diffstat (limited to 'ext/List/Util/Util.xs')
-rw-r--r--ext/List/Util/Util.xs9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs
index 7d7a154878..3a950466e1 100644
--- a/ext/List/Util/Util.xs
+++ b/ext/List/Util/Util.xs
@@ -485,7 +485,16 @@ looks_like_number(sv)
SV *sv
PROTOTYPE: $
CODE:
+#if (PERL_VERSION < 8) || (PERL_VERSION == 8 && PERL_SUBVERSION <5)
+ if (SvPOK(sv) || SvPOKp(sv)) {
+ RETVAL = looks_like_number(sv);
+ }
+ else {
+ RETVAL = SvFLAGS(sv) & (SVf_NOK|SVp_NOK|SVf_IOK|SVp_IOK);
+ }
+#else
RETVAL = looks_like_number(sv);
+#endif
OUTPUT:
RETVAL