This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use FooBAR convention for new pad macros
authorFather Chrysostomos <sprout@cpan.org>
Thu, 23 Aug 2012 04:48:56 +0000 (21:48 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 23 Aug 2012 04:59:40 +0000 (21:59 -0700)
After a while, I realised that it can be confusing for PAD_ARRAY and
PAD_MAX to take a pad argument, but for PAD_SV to take a number and
PAD_SET_CUR a padlist.

I was copying the HEK_KEY convention, which was probably a bad idea.
This is what we use elsewhere:

   TypeMACRO
   ----=====
     AvMAX
    CopFILE
   PmopSTASH
  StashHANDLER
 OpslabREFCNT_dec

Furthermore, heks are not part of the API, so what convention they use
is not so important.

So these:

    PADNAMELIST_*
    PADLIST_*
    PADNAME_*
    PAD_*

are now:

    Padnamelist*
    Padlist*
    Padname*
    Pad*

dump.c
ext/B/B.xs
ext/Devel-Peek/Peek.xs
ext/XS-APItest/APItest.xs
pad.c
pad.h
sv.c

diff --git a/dump.c b/dump.c
index 0b2eee0..3b3a74f 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -2178,7 +2178,7 @@ Perl_debop(pTHX_ const OP *o)
        SV *sv;
         if (cv) {
            PADLIST * const padlist = CvPADLIST(cv);
-            PAD * const comppad = *PADLIST_ARRAY(padlist);
+            PAD * const comppad = *PadlistARRAY(padlist);
             sv = *av_fetch(comppad, o->op_targ, FALSE);
         } else
             sv = NULL;
index 8d5e511..9200cc9 100644 (file)
@@ -607,7 +607,7 @@ typedef HE      *B__HE;
 #if PERL_VERSION >= 9
 typedef struct refcounted_he   *B__RHE;
 #endif
-#ifdef PADLIST_ARRAY
+#ifdef PadlistARRAY
 typedef PADLIST        *B__PADLIST;
 #endif
 
@@ -703,7 +703,7 @@ comppadlist()
     PREINIT:
        PADLIST *padlist = CvPADLIST(PL_main_cv ? PL_main_cv : PL_compcv);
     PPCODE:
-#ifdef PADLIST_ARRAY
+#ifdef PadlistARRAY
        {
            SV * const rv = sv_newmortal();
            sv_setiv(newSVrv(rv, padlist ? "B::PADLIST" : "B::NULL"),
@@ -1997,7 +1997,7 @@ I32
 CvDEPTH(cv)
         B::CV   cv
 
-#ifdef PADLIST_ARRAY
+#ifdef PadlistARRAY
 
 B::PADLIST
 CvPADLIST(cv)
@@ -2094,42 +2094,42 @@ HASH(h)
 
 #endif
 
-#ifdef PADLIST_ARRAY
+#ifdef PadlistARRAY
 
-MODULE = B     PACKAGE = B::PADLIST    PREFIX = PADLIST_
+MODULE = B     PACKAGE = B::PADLIST    PREFIX = Padlist
 
 SSize_t
-PADLIST_MAX(padlist)
+PadlistMAX(padlist)
        B::PADLIST      padlist
 
 void
-PADLIST_ARRAY(padlist)
+PadlistARRAY(padlist)
        B::PADLIST      padlist
     PPCODE:
-       if (PADLIST_MAX(padlist) >= 0) {
-           PAD **padp = PADLIST_ARRAY(padlist);
+       if (PadlistMAX(padlist) >= 0) {
+           PAD **padp = PadlistARRAY(padlist);
            PADOFFSET i;
-           for (i = 0; i <= PADLIST_MAX(padlist); i++)
+           for (i = 0; i <= PadlistMAX(padlist); i++)
                XPUSHs(make_sv_object(aTHX_ (SV *)padp[i]));
        }
 
 void
-PADLIST_ARRAYelt(padlist, idx)
+PadlistARRAYelt(padlist, idx)
        B::PADLIST      padlist
        PADOFFSET       idx
     PPCODE:
-       if (idx >= 0 && PADLIST_MAX(padlist) >= 0
-        && idx <= PADLIST_MAX(padlist))
+       if (idx >= 0 && PadlistMAX(padlist) >= 0
+        && idx <= PadlistMAX(padlist))
            XPUSHs(make_sv_object(aTHX_
-                                 (SV *)PADLIST_ARRAY(padlist)[idx]));
+                                 (SV *)PadlistARRAY(padlist)[idx]));
        else
            XPUSHs(make_sv_object(aTHX_ NULL));
 
 U32
-PADLIST_REFCNT(padlist)
+PadlistREFCNT(padlist)
        B::PADLIST      padlist
     CODE:
-       RETVAL = PADLIST_REFCNT(padlist);
+       RETVAL = PadlistREFCNT(padlist);
     OUTPUT:
        RETVAL
 
index 28e0e83..d44a90f 100644 (file)
@@ -54,8 +54,8 @@ DeadCode(pTHX)
                    PerlIO_printf(Perl_debug_log, "  busy\n");
                    continue;
                }
-               svp = (SV**) PADLIST_ARRAY(padlist);
-               while (++i <= PADLIST_MAX(padlist)) { /* Depth. */
+               svp = (SV**) PadlistARRAY(padlist);
+               while (++i <= PadlistMAX(padlist)) { /* Depth. */
                    SV **args;
                    
                    if (!svp[i]) continue;
@@ -110,7 +110,7 @@ DeadCode(pTHX)
                    if (dumpit)
                        do_sv_dump(0, Perl_debug_log, (SV*)cv, 0, 2, 0, 0);
                }
-               if (PADLIST_MAX(padlist) > 1) {
+               if (PadlistMAX(padlist) > 1) {
                    PerlIO_printf(Perl_debug_log, "  total: refs: %i, strings: %i in %i,\targsarrays: %i, argsstrings: %i\n", 
                            totref, totm, tots, tota, totas);
                }
index fb42935..08694e6 100644 (file)
@@ -3290,10 +3290,10 @@ CV* cv
   PADNAMELIST *pad_namelist;
   AV *retav = newAV();
  CODE:
-  pad_namelist = PADLIST_NAMES(CvPADLIST(cv));
+  pad_namelist = PadlistNAMES(CvPADLIST(cv));
 
-  for ( i = PADNAMELIST_MAX(pad_namelist); i >= 0; i-- ) {
-    PADNAME* name = PADNAMELIST_ARRAY(pad_namelist)[i];
+  for ( i = PadnamelistMAX(pad_namelist); i >= 0; i-- ) {
+    PADNAME* name = PadnamelistARRAY(pad_namelist)[i];
 
     if (SvPOKp(name)) {
         av_push(retav, newSVpadname(name));
diff --git a/pad.c b/pad.c
index fd8b178..148fdf8 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -49,7 +49,7 @@ AV, but that may change) which represents the "names" or rather
 the "static type information" for lexicals.  The individual elements of a
 PADNAMELIST are PADNAMEs (just SVs; but, again, that may change).  Future
 refactorings might stop the PADNAMELIST from being stored in the PADLIST's
-array, so don't rely on it.  See L</PADLIST_NAMES>.
+array, so don't rely on it.  See L</PadlistNAMES>.
 
 The CvDEPTH'th entry of a PADLIST is a PAD (an AV) which is the stack frame
 at that depth of recursion into the CV.  The 0th slot of a frame AV is an
@@ -288,8 +288,8 @@ Perl_pad_new(pTHX_ int flags)
        0..3, and even an explicit call to av_extend() with <3 will be rounded
        up, so we inline the allocation of the array here.  */
     Newx(ary, 2, PAD *);
-    PADLIST_MAX(padlist) = 1;
-    PADLIST_ARRAY(padlist) = ary;
+    PadlistMAX(padlist) = 1;
+    PadlistARRAY(padlist) = ary;
     ary[0] = padname;
     ary[1] = pad;
 
@@ -407,9 +407,9 @@ Perl_cv_undef(pTHX_ CV *cv)
        if (PL_phase != PERL_PHASE_DESTRUCT) { /* don't bother during global destruction */
            CV * const outercv = CvOUTSIDE(cv);
            const U32 seq = CvOUTSIDE_SEQ(cv);
-           PAD * const comppad_name = PADLIST_ARRAY(padlist)[0];
+           PAD * const comppad_name = PadlistARRAY(padlist)[0];
            SV ** const namepad = AvARRAY(comppad_name);
-           PAD * const comppad = PADLIST_ARRAY(padlist)[1];
+           PAD * const comppad = PadlistARRAY(padlist)[1];
            SV ** const curpad = AvARRAY(comppad);
            for (ix = AvFILLp(comppad_name); ix > 0; ix--) {
                SV * const namesv = namepad[ix];
@@ -447,9 +447,9 @@ Perl_cv_undef(pTHX_ CV *cv)
            }
        }
 
-       ix = PADLIST_MAX(padlist);
+       ix = PadlistMAX(padlist);
        while (ix > 0) {
-           PAD * const sv = PADLIST_ARRAY(padlist)[ix--];
+           PAD * const sv = PadlistARRAY(padlist)[ix--];
            if (sv) {
                if (sv == PL_comppad) {
                    PL_comppad = NULL;
@@ -459,12 +459,12 @@ Perl_cv_undef(pTHX_ CV *cv)
            }
        }
        {
-           PAD * const sv = PADLIST_ARRAY(padlist)[0];
+           PAD * const sv = PadlistARRAY(padlist)[0];
            if (sv == PL_comppad_name)
                PL_comppad_name = NULL;
            SvREFCNT_dec(sv);
        }
-       if (PADLIST_ARRAY(padlist)) Safefree(PADLIST_ARRAY(padlist));
+       if (PadlistARRAY(padlist)) Safefree(PadlistARRAY(padlist));
        Safefree(padlist);
        CvPADLIST(cv) = NULL;
     }
@@ -967,7 +967,7 @@ Perl_pad_findmy_pvn(pTHX_ const char *namepv, STRLEN namelen, U32 flags)
      *    our $foo = 0 unless defined $foo;
      * to not give a warning. (Yes, this is a hack) */
 
-    nameav = PADLIST_ARRAY(CvPADLIST(PL_compcv))[0];
+    nameav = PadlistARRAY(CvPADLIST(PL_compcv))[0];
     name_svp = AvARRAY(nameav);
     for (offset = AvFILLp(nameav); offset > 0; offset--) {
         const SV * const namesv = name_svp[offset];
@@ -1084,7 +1084,7 @@ Perl_find_rundefsv2(pTHX_ CV *cv, U32 seq)
     if (po == NOT_IN_PAD || SvPAD_OUR(namesv))
        return DEFSV;
 
-    return AvARRAY(PADLIST_ARRAY(CvPADLIST(cv))[CvDEPTH(cv)])[po];
+    return AvARRAY(PadlistARRAY(CvPADLIST(cv))[CvDEPTH(cv)])[po];
 }
 
 /*
@@ -1147,7 +1147,7 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv,
 
     if (padlist) { /* not an undef CV */
        I32 fake_offset = 0;
-        const AV * const nameav = PADLIST_ARRAY(padlist)[0];
+        const AV * const nameav = PadlistARRAY(padlist)[0];
        SV * const * const name_svp = AvARRAY(nameav);
 
        for (offset = AvFILLp(nameav); offset > 0; offset--) {
@@ -1278,7 +1278,7 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv,
                        return offset;
                    }
 
-                   *out_capture = AvARRAY(PADLIST_ARRAY(padlist)[
+                   *out_capture = AvARRAY(PadlistARRAY(padlist)[
                                    CvDEPTH(cv) ? CvDEPTH(cv) : 1])[offset];
                    DEBUG_Xv(PerlIO_printf(Perl_debug_log,
                        "Pad findlex cv=0x%"UVxf" found lex=0x%"UVxf"\n",
@@ -1342,8 +1342,8 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv,
        SV *new_namesv = newSVsv(*out_name_sv);
        AV *  const ocomppad_name = PL_comppad_name;
        PAD * const ocomppad = PL_comppad;
-       PL_comppad_name = PADLIST_ARRAY(padlist)[0];
-       PL_comppad = PADLIST_ARRAY(padlist)[1];
+       PL_comppad_name = PadlistARRAY(padlist)[0];
+       PL_comppad = PadlistARRAY(padlist)[1];
        PL_curpad = AvARRAY(PL_comppad);
 
        new_offset
@@ -1835,8 +1835,8 @@ Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full)
     if (!padlist) {
        return;
     }
-    pad_name = *PADLIST_ARRAY(padlist);
-    pad = PADLIST_ARRAY(padlist)[1];
+    pad_name = *PadlistARRAY(padlist);
+    pad = PadlistARRAY(padlist)[1];
     pname = AvARRAY(pad_name);
     ppad = AvARRAY(pad);
     Perl_dump_indent(aTHX_ level, file,
@@ -1943,8 +1943,8 @@ Perl_cv_clone(pTHX_ CV *proto)
     dVAR;
     I32 ix;
     PADLIST* const protopadlist = CvPADLIST(proto);
-    const PAD *const protopad_name = *PADLIST_ARRAY(protopadlist);
-    const PAD *const protopad = PADLIST_ARRAY(protopadlist)[1];
+    const PAD *const protopad_name = *PadlistARRAY(protopadlist);
+    const PAD *const protopad = PadlistARRAY(protopadlist)[1];
     SV** const pname = AvARRAY(protopad_name);
     SV** const ppad = AvARRAY(protopad);
     const I32 fname = AvFILLp(protopad_name);
@@ -2020,7 +2020,7 @@ Perl_cv_clone(pTHX_ CV *proto)
     PL_curpad = AvARRAY(PL_comppad);
 
     outpad = outside && CvPADLIST(outside)
-       ? AvARRAY(PADLIST_ARRAY(CvPADLIST(outside))[depth])
+       ? AvARRAY(PadlistARRAY(CvPADLIST(outside))[depth])
        : NULL;
     assert(outpad || SvTYPE(cv) == SVt_PVFM);
     if (outpad) CvPADLIST(cv)->xpadl_outid = CvPADLIST(outside)->xpadl_id;
@@ -2115,8 +2115,8 @@ Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv)
 {
     dVAR;
     I32 ix;
-    AV * const comppad_name = PADLIST_ARRAY(padlist)[0];
-    AV * const comppad = PADLIST_ARRAY(padlist)[1];
+    AV * const comppad_name = PadlistARRAY(padlist)[0];
+    AV * const comppad = PadlistARRAY(padlist)[1];
     SV ** const namepad = AvARRAY(comppad_name);
     SV ** const curpad = AvARRAY(comppad);
 
@@ -2166,8 +2166,8 @@ Perl_pad_push(pTHX_ PADLIST *padlist, int depth)
 
     PERL_ARGS_ASSERT_PAD_PUSH;
 
-    if (depth > PADLIST_MAX(padlist) || !PADLIST_ARRAY(padlist)[depth]) {
-       PAD** const svp = PADLIST_ARRAY(padlist);
+    if (depth > PadlistMAX(padlist) || !PadlistARRAY(padlist)[depth]) {
+       PAD** const svp = PadlistARRAY(padlist);
        AV* const newpad = newAV();
        SV** const oldpad = AvARRAY(svp[depth-1]);
        I32 ix = AvFILLp((const AV *)svp[1]);
@@ -2261,41 +2261,41 @@ Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
        return NULL;
 
     cloneall = param->flags & CLONEf_COPY_STACKS
-       || SvREFCNT(PADLIST_ARRAY(srcpad)[1]) > 1;
-    assert (SvREFCNT(PADLIST_ARRAY(srcpad)[1]) == 1);
+       || SvREFCNT(PadlistARRAY(srcpad)[1]) > 1;
+    assert (SvREFCNT(PadlistARRAY(srcpad)[1]) == 1);
 
-    max = cloneall ? PADLIST_MAX(srcpad) : 1;
+    max = cloneall ? PadlistMAX(srcpad) : 1;
 
     Newx(dstpad, 1, PADLIST);
     ptr_table_store(PL_ptr_table, srcpad, dstpad);
-    PADLIST_MAX(dstpad) = max;
-    Newx(PADLIST_ARRAY(dstpad), max + 1, PAD *);
+    PadlistMAX(dstpad) = max;
+    Newx(PadlistARRAY(dstpad), max + 1, PAD *);
 
     if (cloneall) {
        PADOFFSET depth;
        for (depth = 0; depth <= max; ++depth)
-           PADLIST_ARRAY(dstpad)[depth] =
-               av_dup_inc(PADLIST_ARRAY(srcpad)[depth], param);
+           PadlistARRAY(dstpad)[depth] =
+               av_dup_inc(PadlistARRAY(srcpad)[depth], param);
     } else {
        /* CvDEPTH() on our subroutine will be set to 0, so there's no need
           to build anything other than the first level of pads.  */
-       I32 ix = AvFILLp(PADLIST_ARRAY(srcpad)[1]);
+       I32 ix = AvFILLp(PadlistARRAY(srcpad)[1]);
        AV *pad1;
-       const I32 names_fill = AvFILLp(PADLIST_ARRAY(srcpad)[0]);
-       const PAD *const srcpad1 = PADLIST_ARRAY(srcpad)[1];
+       const I32 names_fill = AvFILLp(PadlistARRAY(srcpad)[0]);
+       const PAD *const srcpad1 = PadlistARRAY(srcpad)[1];
        SV **oldpad = AvARRAY(srcpad1);
        SV **names;
        SV **pad1a;
        AV *args;
 
-       PADLIST_ARRAY(dstpad)[0] =
-           av_dup_inc(PADLIST_ARRAY(srcpad)[0], param);
-       names = AvARRAY(PADLIST_ARRAY(dstpad)[0]);
+       PadlistARRAY(dstpad)[0] =
+           av_dup_inc(PadlistARRAY(srcpad)[0], param);
+       names = AvARRAY(PadlistARRAY(dstpad)[0]);
 
        pad1 = newAV();
 
        av_extend(pad1, ix);
-       PADLIST_ARRAY(dstpad)[1] = pad1;
+       PadlistARRAY(dstpad)[1] = pad1;
        pad1a = AvARRAY(pad1);
 
        if (ix > -1) {
@@ -2369,20 +2369,20 @@ Perl_padlist_store(pTHX_ register PADLIST *padlist, I32 key, PAD *val)
 {
     dVAR;
     PAD **ary;
-    SSize_t const oldmax = PADLIST_MAX(padlist);
+    SSize_t const oldmax = PadlistMAX(padlist);
 
     PERL_ARGS_ASSERT_PADLIST_STORE;
 
     assert(key >= 0);
 
-    if (key > PADLIST_MAX(padlist)) {
-       av_extend_guts(NULL,key,&PADLIST_MAX(padlist),
-                      (SV ***)&PADLIST_ARRAY(padlist),
-                      (SV ***)&PADLIST_ARRAY(padlist));
-       Zero(PADLIST_ARRAY(padlist)+oldmax+1, PADLIST_MAX(padlist)-oldmax,
+    if (key > PadlistMAX(padlist)) {
+       av_extend_guts(NULL,key,&PadlistMAX(padlist),
+                      (SV ***)&PadlistARRAY(padlist),
+                      (SV ***)&PadlistARRAY(padlist));
+       Zero(PadlistARRAY(padlist)+oldmax+1, PadlistMAX(padlist)-oldmax,
             PAD *);
     }
-    ary = PADLIST_ARRAY(padlist);
+    ary = PadlistARRAY(padlist);
     SvREFCNT_dec(ary[key]);
     ary[key] = val;
     return &ary[key];
diff --git a/pad.h b/pad.h
index a966e81..9778f74 100644 (file)
--- a/pad.h
+++ b/pad.h
@@ -175,61 +175,61 @@ Clear the pointed to pad value on scope exit. (i.e. the runtime action of 'my')
 save PL_comppad and PL_curpad
 
 
-=for apidoc Amx|PAD **|PADLIST_ARRAY|PADLIST padlist
+=for apidoc Amx|PAD **|PadlistARRAY|PADLIST padlist
 The C array of a padlist, containing the pads.  Only subscript it with
 numbers >= 1, as the 0th entry is not guaranteed to remain usable.
 
-=for apidoc Amx|SSize_t|PADLIST_MAX|PADLIST padlist
+=for apidoc Amx|SSize_t|PadlistMAX|PADLIST padlist
 The index of the last pad in the padlist.
 
-=for apidoc Amx|PADNAMELIST *|PADLIST_NAMES|PADLIST padlist
+=for apidoc Amx|PADNAMELIST *|PadlistNAMES|PADLIST padlist
 The names associated with pad entries.
 
-=for apidoc Amx|PADNAME **|PADLIST_NAMESARRAY|PADLIST padlist
+=for apidoc Amx|PADNAME **|PadlistNAMESARRAY|PADLIST padlist
 The C array of pad names.
 
-=for apidoc Amx|SSize_t|PADLIST_NAMESMAX|PADLIST padlist
+=for apidoc Amx|SSize_t|PadlistNAMESMAX|PADLIST padlist
 The index of the last pad name.
 
-=for apidoc Amx|U32|PADLIST_REFCNT|PADLIST padlist
+=for apidoc Amx|U32|PadlistREFCNT|PADLIST padlist
 The reference count of the padlist.  Currently this is always 1.
 
-=for apidoc Amx|PADNAME **|PADNAMELIST_ARRAY|PADNAMELIST pnl
+=for apidoc Amx|PADNAME **|PadnamelistARRAY|PADNAMELIST pnl
 The C array of pad names.
 
-=for apidoc Amx|SSize_t|PADNAMELIST_MAX|PADNAMELIST pnl
+=for apidoc Amx|SSize_t|PadnamelistMAX|PADNAMELIST pnl
 The index of the last pad name.
 
-=for apidoc Amx|SV **|PAD_ARRAY|PAD pad
+=for apidoc Amx|SV **|PadARRAY|PAD pad
 The C array of pad entries.
 
-=for apidoc Amx|SSize_t|PAD_MAX|PAD pad
+=for apidoc Amx|SSize_t|PadMAX|PAD pad
 The index of the last pad entry.
 
-=for apidoc Amx|char *|PADNAME_PV|PADNAME pn   
+=for apidoc Amx|char *|PadnamePV|PADNAME pn    
 The name stored in the pad name struct.  This returns NULL for a target or
 GV slot.
 
-=for apidoc Amx|STRLEN|PADNAME_LEN|PADNAME pn  
+=for apidoc Amx|STRLEN|PadnameLEN|PADNAME pn   
 The length of the name.
 
-=for apidoc Amx|bool|PADNAME_UTF8|PADNAME pn
-Whether PADNAME_PV is in UTF8.
+=for apidoc Amx|bool|PadnameUTF8|PADNAME pn
+Whether PadnamePV is in UTF8.
 
-=for apidoc Amx|SV *|PADNAME_SV|PADNAME pn
+=for apidoc Amx|SV *|PadnameSV|PADNAME pn
 Returns the pad name as an SV.  This is currently just C<pn>.  It will
 begin returning a new mortal SV if pad names ever stop being SVs.
 
-=for apidoc m|bool|PADNAME_isOUR|PADNAME pn
+=for apidoc m|bool|PadnameIsOUR|PADNAME pn
 Whether this is an "our" variable.
 
-=for apidoc m|HV *|PADNAME_OURSTASH
+=for apidoc m|HV *|PadnameOURSTASH
 The stash in which this "our" variable was declared.
 
-=for apidoc m|bool|PADNAME_OUTER|PADNAME pn
+=for apidoc m|bool|PadnameOUTER|PADNAME pn
 Whether this entry belongs to an outer pad.
 
-=for apidoc m|HV *|PADNAME_TYPE|PADNAME pn
+=for apidoc m|HV *|PadnameTYPE|PADNAME pn
 The stash associated with a typed lexical.  This returns the %Foo:: hash
 for C<my Foo $bar>.
 
@@ -274,27 +274,27 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 =cut
 */
 
-#define PADLIST_ARRAY(pl)      (pl)->xpadl_alloc
-#define PADLIST_MAX(pl)                (pl)->xpadl_max
-#define PADLIST_NAMES(pl)      (*PADLIST_ARRAY(pl))
-#define PADLIST_NAMESARRAY(pl) PADNAMELIST_ARRAY(PADLIST_NAMES(pl))
-#define PADLIST_NAMESMAX(pl)   PADNAMELIST_MAX(PADLIST_NAMES(pl))
-#define PADLIST_REFCNT(pl)     1       /* reserved for future use */
+#define PadlistARRAY(pl)       (pl)->xpadl_alloc
+#define PadlistMAX(pl)         (pl)->xpadl_max
+#define PadlistNAMES(pl)       (*PadlistARRAY(pl))
+#define PadlistNAMESARRAY(pl)  PadnamelistARRAY(PadlistNAMES(pl))
+#define PadlistNAMESMAX(pl)    PadnamelistMAX(PadlistNAMES(pl))
+#define PadlistREFCNT(pl)      1       /* reserved for future use */
 
-#define PADNAMELIST_ARRAY(pnl) AvARRAY(pnl)
-#define PADNAMELIST_MAX(pnl)   AvFILLp(pnl)
+#define PadnamelistARRAY(pnl)  AvARRAY(pnl)
+#define PadnamelistMAX(pnl)    AvFILLp(pnl)
 
-#define PAD_ARRAY(pad)         AvARRAY(pad)
-#define PAD_MAX(pad)           AvFILLp(pad)
+#define PadARRAY(pad)          AvARRAY(pad)
+#define PadMAX(pad)            AvFILLp(pad)
 
-#define PADNAME_PV(pn)         (SvPOKp(pn) ? SvPVX(pn) : NULL)
-#define PADNAME_LEN(pn)                SvCUR(pn)
-#define PADNAME_UTF8(pn)       !!SvUTF8(pn)
-#define PADNAME_SV(pn)         pn
-#define PADNAME_isOUR(pn)      !!SvPAD_OUR(pn)
-#define PADNAME_OURSTASH(pn)   SvOURSTASH(pn)
-#define PADNAME_OUTER(pn)      !!SvFAKE(pn)
-#define PADNAME_TYPE(pn)       (SvPAD_TYPED(pn) ? SvSTASH(pn) : NULL)
+#define PadnamePV(pn)          (SvPOKp(pn) ? SvPVX(pn) : NULL)
+#define PadnameLEN(pn)         SvCUR(pn)
+#define PadnameUTF8(pn)                !!SvUTF8(pn)
+#define PadnameSV(pn)          pn
+#define PadnameIsOUR(pn)       !!SvPAD_OUR(pn)
+#define PadnameOURSTASH(pn)    SvOURSTASH(pn)
+#define PadnameOUTER(pn)       !!SvFAKE(pn)
+#define PadnameTYPE(pn)                (SvPAD_TYPED(pn) ? SvSTASH(pn) : NULL)
 
 
 #ifdef DEBUGGING
@@ -308,13 +308,13 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
 #define PAD_SVl(po)       (PL_curpad[po])
 
 #define PAD_BASE_SV(padlist, po) \
-       (PADLIST_ARRAY(padlist)[1])                                     \
-           ? AvARRAY(MUTABLE_AV((PADLIST_ARRAY(padlist)[1])))[po] \
+       (PadlistARRAY(padlist)[1])                                      \
+           ? AvARRAY(MUTABLE_AV((PadlistARRAY(padlist)[1])))[po] \
            : NULL;
 
 
 #define PAD_SET_CUR_NOSAVE(padlist,nth) \
-       PL_comppad = (PAD*) (PADLIST_ARRAY(padlist)[nth]);      \
+       PL_comppad = (PAD*) (PadlistARRAY(padlist)[nth]);       \
        PL_curpad = AvARRAY(PL_comppad);                        \
        DEBUG_Xv(PerlIO_printf(Perl_debug_log,                  \
              "Pad 0x%"UVxf"[0x%"UVxf"] set_cur    depth=%d\n", \
diff --git a/sv.c b/sv.c
index 77bb664..779c414 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -13904,7 +13904,7 @@ Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ,
 
        if (!cv || !CvPADLIST(cv))
            return NULL;
-       av = *PADLIST_ARRAY(CvPADLIST(cv));
+       av = *PadlistARRAY(CvPADLIST(cv));
        sv = *av_fetch(av, targ, FALSE);
        sv_setsv(name, sv);
     }