This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A gaggle of casts in Perl_sv_magicext() that are (const ?V *).
authorNicholas Clark <nick@ccl4.org>
Tue, 28 Oct 2008 20:13:13 +0000 (20:13 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 Oct 2008 20:13:13 +0000 (20:13 +0000)
p4raw-id: //depot/perl@34623

sv.c

diff --git a/sv.c b/sv.c
index 1954b95..934eafd 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4714,9 +4714,9 @@ Perl_sv_magicext(pTHX_ SV *const sv, SV *const obj, const int how,
        how == PERL_MAGIC_arylen ||
        how == PERL_MAGIC_symtab ||
        (SvTYPE(obj) == SVt_PVGV &&
-           (GvSV(obj) == sv || GvHV(obj) == (HV*)sv || GvAV(obj) == (AV*)sv ||
-           GvCV(obj) == (CV*)sv || GvIOp(obj) == (IO*)sv ||
-           GvFORM(obj) == (CV*)sv)))
+           (GvSV(obj) == sv || GvHV(obj) == (const HV *)sv
+            || GvAV(obj) == (const AV *)sv || GvCV(obj) == (const CV *)sv
+            || GvIOp(obj) == (const IO *)sv || GvFORM(obj) == (const CV *)sv)))
     {
        mg->mg_obj = obj;
     }