summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>1999-09-13 15:15:11 +0100
committerJarkko Hietaniemi <jhi@iki.fi>1999-09-13 13:23:04 +0000
commit564319723c2c18fa4801cd77e0d203a582b4d5a3 (patch)
tree94b6775a09b4e1758847fd3b22587eeae744317b /sv.c
parent23614c1f233bf6c8f35366cee6be53ae80af0e28 (diff)
downloadperl-564319723c2c18fa4801cd77e0d203a582b4d5a3.tar.gz
Replace change #4100 with
To: gsar@activestate.com Cc: perl5-porters@perl.org Subject: Re: [ID 19990907.004] [PATCH perl5.005_61] compiler warnings with -Duse64bits Message-Id: <199909131315.OAA24012@tempest.npl.co.uk> p4raw-link: @4100 on //depot/cfgperl: 427181846486e3aa5034a647dc1922377185f4c0 p4raw-id: //depot/cfgperl@4136
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sv.c b/sv.c
index 5be8a31102..892eb6eb13 100644
--- a/sv.c
+++ b/sv.c
@@ -612,8 +612,8 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
pv = (char*)SvRV(sv);
cur = 0;
len = 0;
- iv = (IV)PTR_CAST pv;
- nv = (NV)(PTRV)pv;
+ iv = PTR2IV(pv);
+ nv = PTR2NV(pv);
del_XRV(SvANY(sv));
magic = 0;
stash = 0;
@@ -1077,7 +1077,7 @@ Perl_sv_2iv(pTHX_ register SV *sv)
SV* tmpstr;
if (SvAMAGIC(sv) && (tmpstr=AMG_CALLun(sv, numer)))
return SvIV(tmpstr);
- return (IV)PTR_CAST SvRV(sv);
+ return PTR2IV(SvRV(sv));
}
if (SvREADONLY(sv) && !SvOK(sv)) {
dTHR;
@@ -1113,7 +1113,7 @@ Perl_sv_2iv(pTHX_ register SV *sv)
#ifdef IV_IS_QUAD
DEBUG_c(PerlIO_printf(Perl_debug_log,
"0x%" PERL_PRIx64 " 2iv(%" PERL_PRIu64 " => %" PERL_PRId64 ") (as unsigned)\n",
- (UV)PTR_CAST sv,
+ PTR2UV(sv),
(UV)SvUVX(sv), (IV)SvUVX(sv)));
#else
DEBUG_c(PerlIO_printf(Perl_debug_log,
@@ -1222,7 +1222,7 @@ Perl_sv_2uv(pTHX_ register SV *sv)
SV* tmpstr;
if (SvAMAGIC(sv) && (tmpstr=AMG_CALLun(sv, numer)))
return SvUV(tmpstr);
- return (UV)PTR_CAST SvRV(sv);
+ return PTR2UV(SvRV(sv));
}
if (SvREADONLY(sv) && !SvOK(sv)) {
dTHR;
@@ -1393,7 +1393,7 @@ Perl_sv_2nv(pTHX_ register SV *sv)
SV* tmpstr;
if (SvAMAGIC(sv) && (tmpstr=AMG_CALLun(sv,numer)))
return SvNV(tmpstr);
- return (NV)(PTRV)SvRV(sv);
+ return PTR2NV(SvRV(sv));
}
if (SvREADONLY(sv) && !SvOK(sv)) {
dTHR;
@@ -1777,7 +1777,7 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
else
sv_setpv(tsv, s);
#ifdef IV_IS_QUAD
- Perl_sv_catpvf(aTHX_ tsv, "(0x%" PERL_PRIx64")", (UV)PTR_CAST sv);
+ Perl_sv_catpvf(aTHX_ tsv, "(0x%" PERL_PRIx64")", PTR2UV(sv));
#else
Perl_sv_catpvf(aTHX_ tsv, "(0x%lx)", (unsigned long)sv);
#endif
@@ -3691,7 +3691,7 @@ Perl_sv_inc(pTHX_ register SV *sv)
IV i;
if (SvAMAGIC(sv) && AMG_CALLun(sv,inc))
return;
- i = (IV)PTR_CAST SvRV(sv);
+ i = PTR2IV(SvRV(sv));
sv_unref(sv);
sv_setiv(sv, i);
}
@@ -3791,7 +3791,7 @@ Perl_sv_dec(pTHX_ register SV *sv)
IV i;
if (SvAMAGIC(sv) && AMG_CALLun(sv,dec))
return;
- i = (IV)PTR_CAST SvRV(sv);
+ i = PTR2IV(SvRV(sv));
sv_unref(sv);
sv_setiv(sv, i);
}
@@ -4395,7 +4395,7 @@ Perl_sv_setref_pv(pTHX_ SV *rv, const char *classname, void *pv)
SvSETMAGIC(rv);
}
else
- sv_setiv(newSVrv(rv,classname), (IV)PTR_CAST pv);
+ sv_setiv(newSVrv(rv,classname), PTR2IV(pv));
return rv;
}
@@ -4898,9 +4898,9 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
case 'p':
if (args)
- uv = (UV)PTR_CAST va_arg(*args, void*);
+ uv = PTR2UV(va_arg(*args, void*));
else
- uv = (svix < svmax) ? (UV)PTR_CAST svargs[svix++] : 0;
+ uv = (svix < svmax) ? PTR2UV(svargs[svix++]) : 0;
base = 16;
goto integer;