summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-22 11:16:55 -0600
committerFather Chrysostomos <sprout@cpan.org>2012-08-22 12:32:41 -0700
commitc9795579db61c900bacee2790bdceb7bad3dd45d (patch)
tree57e590f5fd8c895fe138182282ade30b1f0e5eab /ext
parent3cb7b6725f8ce3f136bc320e28585ea669d922fd (diff)
downloadperl-c9795579db61c900bacee2790bdceb7bad3dd45d.tar.gz
Devel::Peek: Fix so compiles under C++
Commit 86b9d29366aea0e71ad75b61d04f56f1fe5b0d4d created a new PADLIST type. However, this broke the compilation of Devel::Peek with C++. This commit gets it to compile again, and pass our regression test suite. [Modified by the committer to use the correct PADLIST_ macros; other- wise it will crash.]
Diffstat (limited to 'ext')
-rw-r--r--ext/Devel-Peek/Changes3
-rw-r--r--ext/Devel-Peek/Peek.pm2
-rw-r--r--ext/Devel-Peek/Peek.xs10
3 files changed, 10 insertions, 5 deletions
diff --git a/ext/Devel-Peek/Changes b/ext/Devel-Peek/Changes
index 0bd9583a7e..e26342b447 100644
--- a/ext/Devel-Peek/Changes
+++ b/ext/Devel-Peek/Changes
@@ -68,3 +68,6 @@
1.09:
2012-07-23: Modify tests for 5.18's slightly different flags.
+1.10:
+ 2012-08-22: Update so compiles under C++ with new PADLIST changes in
+ the Perl core
diff --git a/ext/Devel-Peek/Peek.pm b/ext/Devel-Peek/Peek.pm
index 7622efe3c2..68bd332a12 100644
--- a/ext/Devel-Peek/Peek.pm
+++ b/ext/Devel-Peek/Peek.pm
@@ -3,7 +3,7 @@
package Devel::Peek;
-$VERSION = '1.09';
+$VERSION = '1.10';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/ext/Devel-Peek/Peek.xs b/ext/Devel-Peek/Peek.xs
index 5e8deb9830..027a4e837f 100644
--- a/ext/Devel-Peek/Peek.xs
+++ b/ext/Devel-Peek/Peek.xs
@@ -31,7 +31,8 @@ DeadCode(pTHX)
for (sv = sva + 1; sv < svend; ++sv) {
if (SvTYPE(sv) == SVt_PVCV) {
CV *cv = (CV*)sv;
- AV* padlist = CvPADLIST(cv), *argav;
+ PADLIST* padlist = CvPADLIST(cv);
+ AV *argav;
SV** svp;
SV** pad;
int i = 0, j, levelm, totm = 0, levelref, totref = 0;
@@ -53,10 +54,11 @@ DeadCode(pTHX)
PerlIO_printf(Perl_debug_log, " busy\n");
continue;
}
- svp = AvARRAY(padlist);
- while (++i <= AvFILL(padlist)) { /* Depth. */
+ svp = PADLIST_ARRAY(padlist);
+ while (++i <= PADLIST_MAX(padlist)) { /* Depth. */
SV **args;
+ if (!svp[i]) continue;
pad = AvARRAY((AV*)svp[i]);
argav = (AV*)pad[0];
if (!argav || (SV*)argav == &PL_sv_undef) {
@@ -108,7 +110,7 @@ DeadCode(pTHX)
if (dumpit)
do_sv_dump(0, Perl_debug_log, (SV*)cv, 0, 2, 0, 0);
}
- if (AvFILL(padlist) > 1) {
+ if (PADLIST_MAX(padlist) > 1) {
PerlIO_printf(Perl_debug_log, " total: refs: %i, strings: %i in %i,\targsarrays: %i, argsstrings: %i\n",
totref, totm, tots, tota, totas);
}