This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump Devel-PPPort and recover patches from repo
[perl5.git] / dist / Devel-PPPort / parts / inc / misc
index f9c4e57..ffed764 100644 (file)
@@ -12,6 +12,7 @@
 =provides
 
 __UNDEFINED__
+__REDEFINE__
 END_EXTERN_C
 EXTERN_C
 INT2PTR
@@ -229,8 +230,7 @@ __UNDEFINED__ SvRXOK(sv) (!!SvRX(sv))
 __UNDEFINED__  NOOP          /*EMPTY*/(void)0
 
 #if { VERSION < 5.6.1 } && { VERSION < 5.27.7 }
-#undef dNOOP
-__UNDEFINED__ dNOOP struct Perl___notused_struct
+__REDEFINE__ dNOOP struct Perl___notused_struct
 #endif
 
 #ifndef NVTYPE
@@ -270,17 +270,14 @@ __UNDEFINED__  PTR2IV(p)       INT2PTR(IV,p)
 __UNDEFINED__  PTR2UV(p)       INT2PTR(UV,p)
 __UNDEFINED__  PTR2NV(p)       NUM2PTR(NV,p)
 
-#undef START_EXTERN_C
-#undef END_EXTERN_C
-#undef EXTERN_C
 #ifdef __cplusplus
-#  define START_EXTERN_C extern "C" {
-#  define END_EXTERN_C }
-#  define EXTERN_C extern "C"
+__REDEFINE__ START_EXTERN_C extern "C" {
+__REDEFINE__ END_EXTERN_C }
+__REDEFINE__ EXTERN_C extern "C"
 #else
-#  define START_EXTERN_C
-#  define END_EXTERN_C
-#  define EXTERN_C extern
+__REDEFINE__ START_EXTERN_C
+__REDEFINE__ END_EXTERN_C
+__REDEFINE__ EXTERN_C extern
 #endif
 
 #if { VERSION < 5.004 } || defined(PERL_GCC_PEDANTIC)
@@ -297,14 +294,12 @@ __UNDEF_NOT_PROVIDED__  PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #  endif
 #endif
 
-#undef STMT_START
-#undef STMT_END
 #if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
-#    define STMT_START  if (1)
-#    define STMT_END    else (void)0
+__REDEFINE__ STMT_START  if (1)
+__REDEFINE__ STMT_END    else (void)0
 #else
-#    define STMT_START  do
-#    define STMT_END    while (0)
+__REDEFINE__ STMT_START  do
+__REDEFINE__ STMT_END    while (0)
 #endif
 
 __UNDEFINED__  boolSV(b)    ((b) ? &PL_sv_yes : &PL_sv_no)
@@ -354,8 +349,7 @@ __UNDEFINED__  dAXMARK         I32 ax = POPMARK; \
 __UNDEFINED__  XSprePUSH       (sp = PL_stack_base + ax - 1)
 
 #if { VERSION < 5.005 }
-#  undef XSRETURN
-#  define XSRETURN(off)                                   \
+__REDEFINE__ XSRETURN(off)                                   \
       STMT_START {                                        \
           PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
           return;                                         \
@@ -845,8 +839,8 @@ __UNDEFINED__ isIDFIRST_utf8_safe(s,e)  D_PPP_IS_GENERIC_UTF8_SAFE(s, e, IDFIRST
 __UNDEFINED__ isLOWER_utf8_safe(s,e)    D_PPP_IS_GENERIC_UTF8_SAFE(s, e, LOWER)
 __UNDEFINED__ isPRINT_utf8_safe(s,e)    D_PPP_IS_GENERIC_UTF8_SAFE(s, e, PRINT)
 
-#  undef isPSXSPC_utf8_safe   /* Use the modern definition */
-__UNDEFINED__ isPSXSPC_utf8_safe(s,e)   isSPACE_utf8_safe(s,e)
+/* Use the modern definition */
+__REDEFINE__ isPSXSPC_utf8_safe(s,e)   isSPACE_utf8_safe(s,e)
 
 __UNDEFINED__ isPUNCT_utf8_safe(s,e)    D_PPP_IS_GENERIC_UTF8_SAFE(s, e, PUNCT)
 __UNDEFINED__ isSPACE_utf8_safe(s,e)    D_PPP_IS_GENERIC_UTF8_SAFE(s, e, SPACE)
@@ -918,8 +912,8 @@ __UNDEFINED__ isIDFIRST_LC_utf8_safe(s,e)  D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, I
 __UNDEFINED__ isLOWER_LC_utf8_safe(s,e)    D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, LOWER)
 __UNDEFINED__ isPRINT_LC_utf8_safe(s,e)    D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, PRINT)
 
-#  undef isPSXSPC_LC_utf8_safe   /* Use the modern definition */
-__UNDEFINED__ isPSXSPC_LC_utf8_safe(s,e)   isSPACE_LC_utf8_safe(s,e)
+/* Use the modern definition */
+__REDEFINE__ isPSXSPC_LC_utf8_safe(s,e)   isSPACE_LC_utf8_safe(s,e)
 
 __UNDEFINED__ isPUNCT_LC_utf8_safe(s,e)    D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, PUNCT)
 __UNDEFINED__ isSPACE_LC_utf8_safe(s,e)    D_PPP_IS_GENERIC_LC_UTF8_SAFE(s, e, SPACE)
@@ -1175,10 +1169,10 @@ newXS("Devel::PPPort::dAXMARK", XS_Devel__PPPort_dAXMARK, file);
 int
 OpSIBLING_tests()
        PREINIT:
-               OP *x;
-               OP *kid;
-               OP *middlekid;
-               OP *lastkid;
+               OP *x = NULL;
+               OP *kid = NULL;
+               OP *middlekid = NULL;
+               OP *lastkid = NULL;
                int count = 0;
                int failures = 0;
                int i;
@@ -1434,8 +1428,8 @@ check_HeUTF8(utf8_key)
                 hash = newHV();
 
                 key = SvPV(utf8_key, klen);
-                if (SvUTF8(utf8_key)) klen *= -1;
-                hv_store(hash, key, klen, newSVpvs("string"), 0);
+                hv_store(hash, key, SvUTF8(utf8_key) ? -klen : klen,
+                    newSVpvs("string"), 0);
                 hv_iterinit(hash);
                 ent = hv_iternext(hash);
                 assert(ent);