pd |void |pad_fixup_inner_anons|PADLIST *padlist|CV *old_cv|CV *new_cv
pd |void |pad_push |PADLIST *padlist|int depth
+p |HV* |pad_compname_type|PADOFFSET po
#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT)
sd |PADOFFSET|pad_findlex |const char *name|const CV* cv|U32 seq|int warn \
#ifdef PERL_CORE
#define pad_push Perl_pad_push
#endif
+#ifdef PERL_CORE
+#define pad_compname_type Perl_pad_compname_type
+#endif
#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
#define pad_findlex S_pad_findlex
#ifdef PERL_CORE
#define pad_push(a,b) Perl_pad_push(aTHX_ a,b)
#endif
+#ifdef PERL_CORE
+#define pad_compname_type(a) Perl_pad_compname_type(aTHX_ a)
+#endif
#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
#define pad_findlex(a,b,c,d,e,f,g) S_pad_findlex(aTHX_ a,b,c,d,e,f,g)
AvFILLp(padlist) = depth;
}
}
+
+
+HV *
+Perl_pad_compname_type(pTHX_ const PADOFFSET po)
+{
+ SV** const av = av_fetch(PL_comppad_name, po, FALSE);
+ if ( SvFLAGS(*av) & SVpad_TYPED ) {
+ return SvSTASH(*av);
+ }
+ return Nullhv;
+}
#define PAD_COMPNAME_FLAGS(po) SvFLAGS(*av_fetch(PL_comppad_name, (po), FALSE))
#define PAD_COMPNAME_PV(po) SvPV_nolen(*av_fetch(PL_comppad_name, (po), FALSE))
-/* XXX DAPM yuk - using av_fetch twice. Is there a better way? */
-#define PAD_COMPNAME_TYPE(po) \
- ((SvFLAGS(*av_fetch(PL_comppad_name, (po), FALSE)) & SVpad_TYPED) \
- ? (SvSTASH(*av_fetch(PL_comppad_name, (po), FALSE))) : Nullhv)
+#define PAD_COMPNAME_TYPE(po) pad_compname_type(po)
#define PAD_COMPNAME_OURSTASH(po) \
(GvSTASH(*av_fetch(PL_comppad_name, (po), FALSE)))
PERL_CALLCONV void Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv);
PERL_CALLCONV void Perl_pad_push(pTHX_ PADLIST *padlist, int depth);
+PERL_CALLCONV HV* Perl_pad_compname_type(pTHX_ PADOFFSET po);
#if defined(PERL_IN_PAD_C) || defined(PERL_DECL_PROT)
STATIC PADOFFSET S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn, SV** out_capture, SV** out_name_sv, int *out_flags);