This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump Locale-Codes from 3.22 to 3.23
[perl5.git] / cv.h
diff --git a/cv.h b/cv.h
index 072ff1e..7c06727 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -61,14 +61,7 @@ See L<perlguts/Autoloading with XSUBs>.
     (CvFILE(sv) = CopFILE(cop), CvDYNFILE_off(sv))
 #endif
 #define CvFILEGV(sv)   (gv_fetchfile(CvFILE(sv)))
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
-#  define CvDEPTH(sv) (*({const CV *const _cvdepth = (const CV *)sv; \
-                         assert(SvTYPE(_cvdepth) == SVt_PVCV);  \
-                         &((XPVCV*)SvANY(_cvdepth))->xcv_depth; \
-                       }))
-#else
-#  define CvDEPTH(sv)  ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_depth
-#endif
+#define CvDEPTH(sv)    (*S_CvDEPTHp((const CV *)sv))
 #define CvPADLIST(sv)  ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_padlist
 #define CvOUTSIDE(sv)  ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside
 #define CvFLAGS(sv)    ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_flags
@@ -105,6 +98,9 @@ See L<perlguts/Autoloading with XSUBs>.
 #define CVf_NODEBUG    0x0200  /* no DB::sub indirection for this CV
                                   (esp. useful for special XSUBs) */
 #define CVf_CVGV_RC    0x0400  /* CvGV is reference counted */
+#ifdef PERL_CORE
+# define CVf_SLABBED   0x0800  /* Holds refcount on op slab  */
+#endif
 #define CVf_DYNFILE    0x1000  /* The filename isn't static  */
 #define CVf_AUTOLOAD   0x2000  /* SvPVX contains AUTOLOADed sub name  */
 #define CVf_HASEVAL    0x4000  /* contains string eval  */
@@ -167,6 +163,12 @@ See L<perlguts/Autoloading with XSUBs>.
 #define CvCVGV_RC_on(cv)       (CvFLAGS(cv) |= CVf_CVGV_RC)
 #define CvCVGV_RC_off(cv)      (CvFLAGS(cv) &= ~CVf_CVGV_RC)
 
+#ifdef PERL_CORE
+# define CvSLABBED(cv)         (CvFLAGS(cv) & CVf_SLABBED)
+# define CvSLABBED_on(cv)      (CvFLAGS(cv) |= CVf_SLABBED)
+# define CvSLABBED_off(cv)     (CvFLAGS(cv) &= ~CVf_SLABBED)
+#endif
+
 #define CvDYNFILE(cv)          (CvFLAGS(cv) & CVf_DYNFILE)
 #define CvDYNFILE_on(cv)       (CvFLAGS(cv) |= CVf_DYNFILE)
 #define CvDYNFILE_off(cv)      (CvFLAGS(cv) &= ~CVf_DYNFILE)