This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RMG - Note why it is that MAINT is version-bumped late rather than early
[perl5.git] / mg.h
diff --git a/mg.h b/mg.h
index 29e339f..0f2fa29 100644 (file)
--- a/mg.h
+++ b/mg.h
@@ -33,6 +33,7 @@ struct magic {
 
 #define MGf_TAINTEDDIR 1        /* PERL_MAGIC_envelem only */
 #define MGf_MINMATCH   1        /* PERL_MAGIC_regex_global only */
+#define MGf_REQUIRE_GV 1        /* PERL_MAGIC_checkcall only */
 #define MGf_REFCOUNTED 2
 #define MGf_GSKIP      4       /* skip further GETs until after next SET */
 #define MGf_COPY       8       /* has an svt_copy  MGVTBL entry */
@@ -66,8 +67,8 @@ struct magic {
     SvPOK(sv) && !SvGMAGICAL(sv)                          \
        ? (mg)->mg_len = (off), (mg)->mg_flags |= MGf_BYTES \
        : ((mg)->mg_len = DO_UTF8(sv)                        \
-           ? utf8_length((U8 *)(pv), (U8 *)(pv)+(off))       \
-           : (off),                                           \
+           ? (SSize_t)utf8_length((U8 *)(pv), (U8 *)(pv)+(off)) \
+           : (SSize_t)(off),                                     \
           (mg)->mg_flags &= ~MGf_BYTES))
 #endif