This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a cast for C++ compilation
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 19 Feb 2007 10:08:38 +0000 (10:08 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 19 Feb 2007 10:08:38 +0000 (10:08 +0000)
p4raw-id: //depot/perl@30349

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);
-           const char *out = memchr(start, '\0', len);
+           const char *out = (const char*)memchr(start, '\0', len);
            SV *tmp;
            struct refcounted_he *tmp_he;