From: Jerry D. Hedden Date: Fri, 19 Oct 2007 20:50:27 +0000 (-0400) Subject: Re: [PATCH] Fix overloading for 64-bit ints (revised) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a196a5fae2b7b6a1ef27bcb57594bfd4239c9d90;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Fix overloading for 64-bit ints (revised) From: "Jerry D. Hedden" Message-ID: <1ff86f510710191750s3f25eae2x2dc2e90f18f1f716@mail.gmail.com> p4raw-id: //depot/perl@32148 --- diff --git a/pod/perlintern.pod b/pod/perlintern.pod index 272e5d4..198ec58 100644 --- a/pod/perlintern.pod +++ b/pod/perlintern.pod @@ -1046,7 +1046,8 @@ Found in file sv.c X Return an SV with the numeric value of the source SV, doing any necessary -reference or overload conversion. +reference or overload conversion. You must use the C macro to +access this function. SV* sv_2num(SV* sv) diff --git a/sv.c b/sv.c index f418b05..25f1441 100644 --- a/sv.c +++ b/sv.c @@ -2505,7 +2505,8 @@ Perl_sv_2nv(pTHX_ register SV *sv) =for apidoc sv_2num Return an SV with the numeric value of the source SV, doing any necessary -reference or overload conversion. +reference or overload conversion. You must use the C macro to +access this function. =cut */ @@ -2513,9 +2514,6 @@ reference or overload conversion. SV * Perl_sv_2num(pTHX_ register SV *sv) { - if (!SvROK(sv)) - return sv; - if (SvAMAGIC(sv)) { SV * const tmpsv = AMG_CALLun(sv,numer); if (tmpsv && (!SvROK(tmpsv) || (SvRV(tmpsv) != SvRV(sv))))