This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a cast for C++ compilation
[perl5.git] / mg.c
diff --git a/mg.c b/mg.c
index 9a18bcb..47d9cb4 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -2262,7 +2262,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
        else if (strEQ(mg->mg_ptr, "\017PEN")) {
            STRLEN len;
            const char *const start = SvPV(sv, len);
        else if (strEQ(mg->mg_ptr, "\017PEN")) {
            STRLEN len;
            const char *const start = SvPV(sv, len);
-           const char *out = memchr(start, '\0', len);
+           const char *out = (const char*)memchr(start, '\0', len);
            SV *tmp;
            struct refcounted_he *tmp_he;
 
            SV *tmp;
            struct refcounted_he *tmp_he;