Remove dead code: #if PERL_VERSION <= 8 then PERL_VERSION is definitely < 11.
[p5sagit/Devel-Size.git] / Size.xs
diff --git a/Size.xs b/Size.xs
index 32e6269..de1646c 100644 (file)
--- a/Size.xs
+++ b/Size.xs
@@ -589,11 +589,7 @@ thing_size(pTHX_ const SV * const orig_thing, struct state *st) {
 #if PERL_VERSION <= 8
   case SVt_PVBM: TAG;
     total_size += sizeof(XPVBM);
-#if (PERL_VERSION < 11)
     total_size += SvROK(thing) ? thing_size(aTHX_ SvRV(thing), st) : SvLEN(thing);
-#else
-    total_size += SvLEN(thing);
-#endif
     total_size += magic_size(thing, st);
     TAG;break;
 #endif
@@ -862,12 +858,10 @@ CODE:
 
   pending_array = newAV();
 
-  /* We cannot push HV/AV directly, only the RV. So deref it
-     later (see below for "*** dereference later") and adjust here for
-     the miscalculation.
+  /* If they passed us a reference then dereference it.
      This is the only way we can check the sizes of arrays and hashes. */
   if (SvROK(thing)) {
-      RETVAL -= thing_size(aTHX_ thing, NULL);
+      thing = SvRV(thing);
   } 
 
   /* Put it on the pending array */
@@ -890,8 +884,6 @@ CODE:
         av_push(pending_array, SvRV(thing));
         } 
       TAG;break;
-
-    /* this is the "*** dereference later" part - see above */
 #if (PERL_VERSION < 11)
         case SVt_RV: TAG;
 #else