diff options
-rw-r--r-- | embed.fnc | 2 | ||||
-rw-r--r-- | embed.h | 1 | ||||
-rw-r--r-- | pad.c | 18 | ||||
-rw-r--r-- | proto.h | 5 |
4 files changed, 26 insertions, 0 deletions
@@ -2152,6 +2152,8 @@ ApdR |PADOFFSET|pad_findmy_pv|NN const char* name|U32 flags ApdR |PADOFFSET|pad_findmy_sv|NN SV* name|U32 flags ApdD |PADOFFSET|find_rundefsvoffset | Apd |SV* |find_rundefsv | +: Used in pp.c +p |SV* |find_rundefsv2 |NN CV *cv|U32 seq #if defined(PERL_IN_PAD_C) sd |PADOFFSET|pad_findlex |NN const char *namepv|STRLEN namelen|U32 flags \ |NN const CV* cv|U32 seq|int warn \ @@ -1034,6 +1034,7 @@ #define dump_packsubs_perl(a,b) Perl_dump_packsubs_perl(aTHX_ a,b) #define dump_sub_perl(a,b) Perl_dump_sub_perl(aTHX_ a,b) #define finalize_optree(a) Perl_finalize_optree(aTHX_ a) +#define find_rundefsv2(a,b) Perl_find_rundefsv2(aTHX_ a,b) #define find_script(a,b,c,d) Perl_find_script(aTHX_ a,b,c,d) #define free_tied_hv_pool() Perl_free_tied_hv_pool(aTHX) #define get_hash_seed() Perl_get_hash_seed(aTHX) @@ -994,6 +994,24 @@ Perl_find_rundefsv(pTHX) return PAD_SVl(po); } +SV * +Perl_find_rundefsv2(pTHX_ CV *cv, U32 seq) +{ + SV *namesv; + int flags; + PADOFFSET po; + + PERL_ARGS_ASSERT_FIND_RUNDEFSV2; + + po = pad_findlex("$_", 2, 0, cv, seq, 1, + NULL, &namesv, &flags); + + if (po == NOT_IN_PAD || SvPAD_OUR(namesv)) + return DEFSV; + + return AvARRAY((PAD*) (AvARRAY(CvPADLIST(cv))[CvDEPTH(cv)]))[po]; +} + /* =for apidoc m|PADOFFSET|pad_findlex|const char *namepv|STRLEN namelen|U32 flags|const CV* cv|U32 seq|int warn|SV** out_capture|SV** out_name_sv|int *out_flags @@ -975,6 +975,11 @@ PERL_CALLCONV CV* Perl_find_runcv(pTHX_ U32 *db_seqp) __attribute__warn_unused_result__; PERL_CALLCONV SV* Perl_find_rundefsv(pTHX); +PERL_CALLCONV SV* Perl_find_rundefsv2(pTHX_ CV *cv, U32 seq) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FIND_RUNDEFSV2 \ + assert(cv) + PERL_CALLCONV PADOFFSET Perl_find_rundefsvoffset(pTHX) __attribute__deprecated__; |