summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sv.c b/sv.c
index 3293a91faa..cce7b6d25c 100644
--- a/sv.c
+++ b/sv.c
@@ -4736,7 +4736,7 @@ Perl_sv_magicext(pTHX_ SV *const sv, SV *const obj, const int how,
*/
if (how == PERL_MAGIC_tiedscalar && SvTYPE(sv) == SVt_PVIO &&
- obj && SvROK(obj) && GvIO(SvRV(obj)) == (IO*)sv)
+ obj && SvROK(obj) && GvIO(SvRV(obj)) == (const IO *)sv)
{
sv_rvweaken(obj);
}
@@ -5494,7 +5494,7 @@ Perl_sv_clear(pTHX_ register SV *const sv)
IoIFP(sv) != PerlIO_stdout() &&
IoIFP(sv) != PerlIO_stderr())
{
- io_close((IO*)sv, FALSE);
+ io_close(MUTABLE_IO(sv), FALSE);
}
if (IoDIRP(sv) && !(IoFLAGS(sv) & IOf_FAKE_DIRP))
PerlDir_close(IoDIRP(sv));
@@ -7889,7 +7889,7 @@ Perl_sv_2io(pTHX_ SV *const sv)
switch (SvTYPE(sv)) {
case SVt_PVIO:
- io = (IO*)sv;
+ io = MUTABLE_IO(sv);
break;
case SVt_PVGV:
if (isGV_with_GP(sv)) {
@@ -10090,8 +10090,8 @@ ptr_table_* functions.
#define hv_dup_inc(s,t) MUTABLE_HV(SvREFCNT_inc(sv_dup((const SV *)s,t)))
#define cv_dup(s,t) MUTABLE_CV(sv_dup((SV*)s,t))
#define cv_dup_inc(s,t) MUTABLE_CV(SvREFCNT_inc(sv_dup((const SV *)s,t)))
-#define io_dup(s,t) (IO*)sv_dup((SV*)s,t)
-#define io_dup_inc(s,t) (IO*)SvREFCNT_inc(sv_dup((const SV *)s,t))
+#define io_dup(s,t) MUTABLE_IO(sv_dup((SV*)s,t))
+#define io_dup_inc(s,t) MUTABLE_IO(SvREFCNT_inc(sv_dup((const SV *)s,t)))
#define gv_dup(s,t) (GV*)sv_dup((SV*)s,t)
#define gv_dup_inc(s,t) (GV*)SvREFCNT_inc(sv_dup((const SV *)s,t))
#define SAVEPV(p) ((p) ? savepv(p) : NULL)