X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Size.xs;h=e958bef2ba7e8fe6a05e471c7aad575dca096b29;hb=384ebd3ff6310db79700990db048c774d0188889;hp=d538fdf68d022f5040350cdd5ab081e84a8bbc9c;hpb=177ebd37c766a3ff9b89f91a8215e91111c63c7b;p=p5sagit%2FDevel-Size.git diff --git a/Size.xs b/Size.xs index d538fdf..e958bef 100644 --- a/Size.xs +++ b/Size.xs @@ -146,7 +146,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 +181,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 +624,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 +811,7 @@ sv_size(pTHX_ struct state *const st, const SV * const orig_thing, TAG;break; } - return TRUE; + return; } static struct state * @@ -831,6 +831,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; }