summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2007-10-11 06:23:03 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-10-11 14:29:02 +0000
commit19119994cb808157abfddb5879338976e13d711a (patch)
tree7e2ed7ca237b662809e624b9d4279988c8b28233 /pp.c
parent76eabe0aca153436b67ab32fc018825da54b3981 (diff)
downloadperl-19119994cb808157abfddb5879338976e13d711a.tar.gz
pp_int should treat refs as UVs (not IVs)
From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510710110723p6cbed55fo558777258061b556@mail.gmail.com> p4raw-id: //depot/perl@32100
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp.c b/pp.c
index 3e22febc33..d5337384b5 100644
--- a/pp.c
+++ b/pp.c
@@ -2874,7 +2874,7 @@ PP(pp_int)
{
dVAR; dSP; dTARGET; tryAMAGICun(int);
{
- SV *sv = TOPs;
+ dTOPss;
IV iv;
/* XXX it's arguable that compiler casting to IV might be subtly
different from modf (for numbers inside (IV_MIN,UV_MAX)) in which
@@ -2886,7 +2886,7 @@ PP(pp_int)
if (!tsv)
break;
if (SvROK(tsv) && SvRV(tsv) == SvRV(sv)) {
- SETi(PTR2IV(SvRV(sv)));
+ SETu(PTR2UV(SvRV(sv)));
RETURN;
}
else
@@ -2904,7 +2904,7 @@ PP(pp_int)
SETi(iv);
}
else if (SvROK(sv)) {
- SETi(iv);
+ SETu(PTR2UV(SvRV(sv)));
}
else {
const NV value = SvNV(sv);