fix madprop_size, hopefully (untested)
Tim Bunce [Wed, 17 Oct 2012 09:25:52 +0000 (10:25 +0100)]
SizeMe.xs

index d68e8af..4b1670d 100644 (file)
--- a/SizeMe.xs
+++ b/SizeMe.xs
@@ -1495,14 +1495,13 @@ unseen_sv_size(pTHX_ struct state *st, pPATH)
 static void
 madprop_size(pTHX_ struct state *const st, pPATH, MADPROP *prop)
 {
-  dPathNodes(2, NPathArg);
+  dNPathNodes(2, NPathArg);
   if (!check_new(st, prop))
     return;
-  NPathPushNode("madprop_size", NPtype_NAME);
+  NPathPushNode("madprop", NPtype_NAME);
   ADD_SIZE(st, "MADPROP", sizeof(MADPROP));
-
-  NPathPushNode("val");
-  ADD_SIZE(st, "val", prop->mad_val);
+  ADD_SIZE(st, "val", prop->mad_vlen);
+  /* XXX recurses, so should perhaps be handled like op_size to avoid the chain */
   if (prop->mad_next)
     madprop_size(aTHX_ st, NPathLink("mad_next"), prop->mad_next);
 }