summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-09-11 17:24:38 -0600
committerKarl Williamson <khw@cpan.org>2019-09-15 10:39:56 -0600
commit74804ad189340f2812955e3c4308a6a82c0cc0eb (patch)
tree01891d566d72b257679694fe7e8fce804bf08445
parent94b0cb42d04bb202dba31ef85db6c93b0c93ae6d (diff)
downloadperl-74804ad189340f2812955e3c4308a6a82c0cc0eb.tar.gz
Add embed.fnc entries for Cv inline fcns
and change the name of one. CvDEPTH shouldn't have a trailing 'p' to indicate private memeber access. It may do so internally, but the name shouldn't indicate that.
-rw-r--r--cv.h4
-rw-r--r--embed.fnc2
-rw-r--r--inline.h6
-rw-r--r--proto.h10
4 files changed, 19 insertions, 3 deletions
diff --git a/cv.h b/cv.h
index df424324a2..9a169e865c 100644
--- a/cv.h
+++ b/cv.h
@@ -61,9 +61,9 @@ See L<perlguts/Autoloading with XSUBs>.
(CvFILE(sv) = CopFILE(cop), CvDYNFILE_off(sv))
#endif
#define CvFILEGV(sv) (gv_fetchfile(CvFILE(sv)))
-#define CvDEPTH(sv) (*Perl_CvDEPTHp((const CV *)sv))
+#define CvDEPTH(sv) (*Perl_CvDEPTH((const CV *)sv))
/* For use when you only have a XPVCV*, not a real CV*.
- Must be assert protected as in S_CvDEPTHp before use. */
+ Must be assert protected as in Perl_CvDEPTH before use. */
#define CvDEPTHunsafe(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_depth
/* these CvPADLIST/CvRESERVED asserts can be reverted one day, once stabilized */
diff --git a/embed.fnc b/embed.fnc
index 70e3411485..19e79f52cd 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -572,6 +572,8 @@ Apd |void |cv_undef |NN CV* cv
p |void |cv_undef_flags |NN CV* cv|U32 flags
pd |void |cv_forget_slab |NULLOK CV *cv
Ap |void |cx_dump |NN PERL_CONTEXT* cx
+AiMp |GV * |CvGV |NN CV *sv
+AiMTp |I32 * |CvDEPTH |NN const CV * const sv
Aphd |SV* |filter_add |NULLOK filter_t funcp|NULLOK SV* datasv
Ap |void |filter_del |NN filter_t funcp
ApRhd |I32 |filter_read |int idx|NN SV *buf_sv|int maxlen
diff --git a/inline.h b/inline.h
index f31ce6a8c9..5bae44e2bd 100644
--- a/inline.h
+++ b/inline.h
@@ -53,15 +53,19 @@ Perl_av_top_index(pTHX_ AV *av)
PERL_STATIC_INLINE GV *
Perl_CvGV(pTHX_ CV *sv)
{
+ PERL_ARGS_ASSERT_CVGV;
+
return CvNAMED(sv)
? Perl_cvgv_from_hek(aTHX_ sv)
: ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_gv_u.xcv_gv;
}
PERL_STATIC_INLINE I32 *
-Perl_CvDEPTHp(const CV * const sv)
+Perl_CvDEPTH(const CV * const sv)
{
+ PERL_ARGS_ASSERT_CVDEPTH;
assert(SvTYPE(sv) == SVt_PVCV || SvTYPE(sv) == SVt_PVFM);
+
return &((XPVCV*)SvANY(sv))->xcv_depth;
}
diff --git a/proto.h b/proto.h
index ee3a528a89..8d74d66eac 100644
--- a/proto.h
+++ b/proto.h
@@ -25,6 +25,16 @@ PERL_CALLCONV UV ASCII_TO_NEED(const UV enc, const UV ch)
#define PERL_ARGS_ASSERT_ASCII_TO_NEED
#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE I32 * Perl_CvDEPTH(const CV * const sv);
+#define PERL_ARGS_ASSERT_CVDEPTH \
+ assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE GV * Perl_CvGV(pTHX_ CV *sv);
+#define PERL_ARGS_ASSERT_CVGV \
+ assert(sv)
+#endif
PERL_CALLCONV int Perl_Gv_AMupdate(pTHX_ HV* stash, bool destructing);
#define PERL_ARGS_ASSERT_GV_AMUPDATE \
assert(stash)