Add a comment to force emacs to use C mode.
[p5sagit/Devel-Size.git] / Size.xs
diff --git a/Size.xs b/Size.xs
index d538fdf..9dd4f0d 100644 (file)
--- a/Size.xs
+++ b/Size.xs
@@ -1,3 +1,5 @@
+/* -*- mode: C -*- */
+
 #define PERL_NO_GET_CONTEXT
 
 #include "EXTERN.h"
@@ -146,7 +148,7 @@ free_tracking_at(void **tv, int level)
        /* Nodes */
        do {
            if (tv[i]) {
-               free_tracking_at(tv[i], level);
+               free_tracking_at((void **) tv[i], level);
                Safefree(tv[i]);
            }
        } while (i--);
@@ -181,7 +183,7 @@ free_state(struct state *st)
 #define SOME_RECURSION 1
 #define TOTAL_SIZE_RECURSION 2
 
-static bool sv_size(pTHX_ struct state *, const SV *const, const int recurse);
+static void sv_size(pTHX_ struct state *, const SV *const, const int recurse);
 
 typedef enum {
     OPc_NULL,   /* 0 */
@@ -624,19 +626,19 @@ const U8 body_sizes[SVt_LAST] = {
 #endif
 };
 
-static bool
+static void
 sv_size(pTHX_ struct state *const st, const SV * const orig_thing,
        const int recurse) {
   const SV *thing = orig_thing;
   U32 type;
 
   if(!check_new(st, thing))
-      return FALSE;
+      return;
 
   type = SvTYPE(thing);
   if (type > SVt_LAST) {
       warn("Devel::Size: Unknown variable type: %d encountered\n", type);
-      return TRUE;
+      return;
   }
   st->total_size += sizeof(SV) + body_sizes[type];
 
@@ -811,7 +813,7 @@ sv_size(pTHX_ struct state *const st, const SV * const orig_thing,
     TAG;break;
 
   }
-  return TRUE;
+  return;
 }
 
 static struct state *
@@ -831,6 +833,9 @@ new_state(pTHX)
     check_new(st, &PL_sv_undef);
     check_new(st, &PL_sv_no);
     check_new(st, &PL_sv_yes);
+#if PERL_VERSION > 8 || (PERL_VERSION == 8 && PERL_SUBVERSION > 0)
+    check_new(st, &PL_sv_placeholder);
+#endif
     return st;
 }