summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-08-04 11:58:27 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-08-07 08:15:39 +0000
commit10edeb5d2457364a70a6848a864cfa6b89dfc882 (patch)
tree901034210efd6983fe16b782168144371eb95631 /sv.c
parent435fbc73c32c7bd8a6a0cdb8a1ea0ca077918585 (diff)
downloadperl-10edeb5d2457364a70a6848a864cfa6b89dfc882.tar.gz
g++ large patch
Message-ID: <44D2E203.5050201@iki.fi> p4raw-id: //depot/perl@28662
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sv.c b/sv.c
index 065a29264b..146d9e7723 100644
--- a/sv.c
+++ b/sv.c
@@ -1450,10 +1450,10 @@ Perl_sv_grow(pTHX_ register SV *sv, register STRLEN newlen)
return s;
} else
#endif
- s = saferealloc(s, newlen);
+ s = (char*)saferealloc(s, newlen);
}
else {
- s = safemalloc(newlen);
+ s = (char*)safemalloc(newlen);
if (SvPVX_const(sv) && SvCUR(sv)) {
Move(SvPVX_const(sv), s, (newlen < SvCUR(sv)) ? newlen : SvCUR(sv), char);
}
@@ -2688,7 +2688,7 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
s = SvGROW_mutable(sv, len + 1);
SvCUR_set(sv, len);
SvPOKp_on(sv);
- return memcpy(s, tbuf, len + 1);
+ return (char*)memcpy(s, tbuf, len + 1);
}
}
if (SvROK(sv)) {
@@ -3317,9 +3317,10 @@ S_glob_assign_ref(pTHX_ SV *dstr, SV *sstr) {
|| sv_cmp(cv_const_sv(cv),
cv_const_sv((CV*)sref))))) {
Perl_warner(aTHX_ packWARN(WARN_REDEFINE),
- CvCONST(cv)
- ? "Constant subroutine %s::%s redefined"
- : "Subroutine %s::%s redefined",
+ (const char *)
+ (CvCONST(cv)
+ ? "Constant subroutine %s::%s redefined"
+ : "Subroutine %s::%s redefined"),
HvNAME_get(GvSTASH((GV*)dstr)),
GvENAME((GV*)dstr));
}
@@ -3950,13 +3951,13 @@ Perl_sv_usepvn_flags(pTHX_ SV *sv, char *ptr, STRLEN len, U32 flags)
} else {
#ifdef DEBUGGING
/* Force a move to shake out bugs in callers. */
- char *new_ptr = safemalloc(allocate);
+ char *new_ptr = (char*)safemalloc(allocate);
Copy(ptr, new_ptr, len, char);
PoisonFree(ptr,len,char);
Safefree(ptr);
ptr = new_ptr;
#else
- ptr = saferealloc (ptr, allocate);
+ ptr = (char*) saferealloc (ptr, allocate);
#endif
}
SvPV_set(sv, ptr);