Fix measurement of struct svop (OPc_SVOP was adding sizeof(struct pmop)) fix-struct-svop
Tim Bunce [Thu, 30 Aug 2012 20:08:50 +0000 (21:08 +0100)]
CHANGES
Size.xs

diff --git a/CHANGES b/CHANGES
index c99fc5a..a7debaa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 Revision history for Perl extension Devel::Size.
 
  * Spelling fix to docs from gregor herrmann [CPAN #78766]
+ * Fix measurement of struct svop [Tim]
 
 0.78 2011-07-26 nicholas
  [no changes]
diff --git a/Size.xs b/Size.xs
index 252dab2..791eac0 100644 (file)
--- a/Size.xs
+++ b/Size.xs
@@ -471,7 +471,7 @@ op_size(pTHX_ const OP * const baseop, struct state *st)
 #endif
            TAG;break;
        case OPc_SVOP: TAG;
-           st->total_size += sizeof(struct pmop);
+           st->total_size += sizeof(struct svop);
            if (!(baseop->op_type == OP_AELEMFAST
                  && baseop->op_flags & OPf_SPECIAL)) {
                /* not an OP_PADAV replacement */