This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
It's good to be able to dump FORMATs too :-)
[perl5.git] / cv.h
diff --git a/cv.h b/cv.h
index cd0b760..f49185a 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -124,7 +124,8 @@ Returns the stash of the CV.
 #define CvFILEGV(sv)   (gv_fetchfile(CvFILE(sv)))
 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
 #  define CvDEPTH(sv) (*({const CV *_cv = (CV *)sv; \
 #define CvFILEGV(sv)   (gv_fetchfile(CvFILE(sv)))
 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
 #  define CvDEPTH(sv) (*({const CV *_cv = (CV *)sv; \
-                         assert(SvTYPE(_cv) == SVt_PVCV); \
+                         assert(SvTYPE(_cv) == SVt_PVCV ||      \
+                                SvTYPE(_cv) == SVt_PVFM);       \
                          &((XPVCV*)SvANY(_cv))->xiv_u.xivu_i32; \
                        }))
 #else
                          &((XPVCV*)SvANY(_cv))->xiv_u.xivu_i32; \
                        }))
 #else