summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-15 22:27:54 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-21 16:51:14 -0700
commitb70d55581aad461af858eb07a2e80ed5fcc653c1 (patch)
treecd79a718eca54f6504b4f6fe843d4c44a63bdcb6
parent6763423431e1ea415b9abe4d7d5d8715e9203fc3 (diff)
downloadperl-b70d55581aad461af858eb07a2e80ed5fcc653c1.tar.gz
Use PADLIST in more places
Much code relies on the fact that PADLIST is typedeffed as AV. PADLIST should be treated as a distinct type.
-rw-r--r--cop.h4
-rw-r--r--dump.c2
-rw-r--r--embed.fnc3
-rw-r--r--op.c2
-rw-r--r--pad.c18
-rw-r--r--pp_ctl.c2
-rw-r--r--pp_hot.c2
-rw-r--r--pp_sort.c2
-rw-r--r--proto.h2
-rw-r--r--sv.h2
10 files changed, 21 insertions, 18 deletions
diff --git a/cop.h b/cop.h
index 8a0ea80b16..7f0dbbdda0 100644
--- a/cop.h
+++ b/cop.h
@@ -1189,7 +1189,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
STMT_START { \
CV * const _nOnclAshIngNamE_ = the_cv; \
CV * const cv = _nOnclAshIngNamE_; \
- AV * const padlist = CvPADLIST(cv); \
+ PADLIST * const padlist = CvPADLIST(cv); \
ENTER; \
multicall_oldcatch = CATCH_GET; \
SAVETMPS; SAVEVPTR(PL_op); \
@@ -1233,7 +1233,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
STMT_START { \
CV * const _nOnclAshIngNamE_ = the_cv; \
CV * const cv = _nOnclAshIngNamE_; \
- AV * const padlist = CvPADLIST(cv); \
+ PADLIST * const padlist = CvPADLIST(cv); \
cx = &cxstack[cxstack_ix]; \
assert(cx->cx_type & CXp_MULTICALL); \
if (! ((CvDEPTH(multicall_cv) = cx->blk_sub.olddepth)) ) { \
diff --git a/dump.c b/dump.c
index 0c5cc75d81..bad42b5499 100644
--- a/dump.c
+++ b/dump.c
@@ -2177,7 +2177,7 @@ Perl_debop(pTHX_ const OP *o)
CV * const cv = deb_curcv(cxstack_ix);
SV *sv;
if (cv) {
- AV * const padlist = CvPADLIST(cv);
+ PADLIST * const padlist = CvPADLIST(cv);
AV * const comppad = MUTABLE_AV(*av_fetch(padlist, 0, FALSE));
sv = *av_fetch(comppad, o->op_targ, FALSE);
} else
diff --git a/embed.fnc b/embed.fnc
index 64bc3814d8..95a4719350 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2337,7 +2337,8 @@ pd |void |pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv
pdX |void |pad_push |NN PADLIST *padlist|int depth
ApdR |HV* |pad_compname_type|const PADOFFSET po
#if defined(USE_ITHREADS)
-pdR |AV* |padlist_dup |NULLOK AV *srcpad|NN CLONE_PARAMS *param
+pdR |PADLIST *|padlist_dup |NULLOK PADLIST *srcpad \
+ |NN CLONE_PARAMS *param
#endif
ApdR |CV* |find_runcv |NULLOK U32 *db_seqp
diff --git a/op.c b/op.c
index 9c87201b97..1a0e5abc21 100644
--- a/op.c
+++ b/op.c
@@ -7066,7 +7066,7 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
#endif
) {
cv_flags_t existing_builtin_attrs = CvFLAGS(cv) & CVf_BUILTIN_ATTRS;
- AV *const temp_av = CvPADLIST(cv);
+ PADLIST *const temp_av = CvPADLIST(cv);
CV *const temp_cv = CvOUTSIDE(cv);
const cv_flags_t other_flags =
CvFLAGS(cv) & (CVf_SLABBED|CVf_WEAKOUTSIDE);
diff --git a/pad.c b/pad.c
index 0f2cf7c074..e18560b292 100644
--- a/pad.c
+++ b/pad.c
@@ -1124,7 +1124,7 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv,
I32 offset, new_offset;
SV *new_capture;
SV **new_capturep;
- const AV * const padlist = CvPADLIST(cv);
+ const PADLIST * const padlist = CvPADLIST(cv);
const bool staleok = !!(flags & padadd_STALEOK);
PERL_ARGS_ASSERT_PAD_FINDLEX;
@@ -1896,7 +1896,7 @@ S_cv_dump(pTHX_ const CV *cv, const char *title)
{
dVAR;
const CV * const outside = CvOUTSIDE(cv);
- AV* const padlist = CvPADLIST(cv);
+ PADLIST* const padlist = CvPADLIST(cv);
PERL_ARGS_ASSERT_CV_DUMP;
@@ -1940,9 +1940,11 @@ Perl_cv_clone(pTHX_ CV *proto)
{
dVAR;
I32 ix;
- AV* const protopadlist = CvPADLIST(proto);
- const AV *const protopad_name = (const AV *)*av_fetch(protopadlist, 0, FALSE);
- const AV *const protopad = (const AV *)*av_fetch(protopadlist, 1, FALSE);
+ PADLIST* const protopadlist = CvPADLIST(proto);
+ const AV *const protopad_name =
+ (const AV *)*av_fetch(protopadlist, 0, FALSE);
+ const AV *const protopad =
+ (const AV *)*av_fetch(protopadlist, 1, FALSE);
SV** const pname = AvARRAY(protopad_name);
SV** const ppad = AvARRAY(protopad);
const I32 fname = AvFILLp(protopad_name);
@@ -2236,15 +2238,15 @@ Perl_pad_compname_type(pTHX_ const PADOFFSET po)
# define av_dup_inc(s,t) MUTABLE_AV(sv_dup_inc((const SV *)s,t))
/*
-=for apidoc m|AV *|padlist_dup|AV *srcpad|CLONE_PARAMS *param
+=for apidoc padlist_dup
Duplicates a pad.
=cut
*/
-AV *
-Perl_padlist_dup(pTHX_ AV *srcpad, CLONE_PARAMS *param)
+PADLIST *
+Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
{
AV *dstpad;
PERL_ARGS_ASSERT_PADLIST_DUP;
diff --git a/pp_ctl.c b/pp_ctl.c
index 6990d32bbd..496f753c75 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2871,7 +2871,7 @@ PP(pp_goto)
return retop;
}
else {
- AV* const padlist = CvPADLIST(cv);
+ PADLIST * const padlist = CvPADLIST(cv);
if (CxTYPE(cx) == CXt_EVAL) {
PL_in_eval = CxOLD_IN_EVAL(cx);
PL_eval_root = cx->blk_eval.old_eval_root;
diff --git a/pp_hot.c b/pp_hot.c
index 11b7b59246..2493ae5a54 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2683,7 +2683,7 @@ try_autoload:
/* This path taken at least 75% of the time */
dMARK;
I32 items = SP - MARK;
- AV* const padlist = CvPADLIST(cv);
+ PADLIST * const padlist = CvPADLIST(cv);
PUSHBLOCK(cx, CXt_SUB, MARK);
PUSHSUB(cx);
cx->blk_sub.retop = PL_op->op_next;
diff --git a/pp_sort.c b/pp_sort.c
index e97e0a15fd..30595f062f 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1667,7 +1667,7 @@ PP(pp_sort)
if (CvDEPTH(cv)) SvREFCNT_inc_simple_void_NN(cv);
PUSHSUB(cx);
if (!is_xsub) {
- AV* const padlist = CvPADLIST(cv);
+ PADLIST * const padlist = CvPADLIST(cv);
if (++CvDEPTH(cv) >= 2) {
PERL_STACK_OVERFLOW_CHECK();
diff --git a/proto.h b/proto.h
index 78fd691f46..71de1d3c9d 100644
--- a/proto.h
+++ b/proto.h
@@ -7619,7 +7619,7 @@ PERL_CALLCONV OP* Perl_newPADOP(pTHX_ I32 type, I32 flags, SV* sv)
#define PERL_ARGS_ASSERT_NEWPADOP \
assert(sv)
-PERL_CALLCONV AV* Perl_padlist_dup(pTHX_ AV *srcpad, CLONE_PARAMS *param)
+PERL_CALLCONV PADLIST * Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_PADLIST_DUP \
diff --git a/sv.h b/sv.h
index 86af9dfca1..7ec1c052f1 100644
--- a/sv.h
+++ b/sv.h
@@ -477,7 +477,7 @@ typedef U16 cv_flags_t;
} xcv_root_u; \
GV * xcv_gv; \
char * xcv_file; \
- AV * xcv_padlist; \
+ PADLIST * xcv_padlist; \
CV * xcv_outside; \
U32 xcv_outside_seq; /* the COP sequence (at the point of our \
* compilation) in the lexically enclosing \