From: Nicholas Clark Date: Sun, 8 May 2011 20:16:43 +0000 (+0200) Subject: sv_size() can return void once more. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-Size.git;a=commitdiff_plain;h=a5c6bdd7895f5ca3ffe055e7c914a39937fdf69b;hp=177ebd37c766a3ff9b89f91a8215e91111c63c7b sv_size() can return void once more. All the code that relied on it returning the result of its call to check_new() has been removed. --- diff --git a/Size.xs b/Size.xs index d538fdf..b18e046 100644 --- a/Size.xs +++ b/Size.xs @@ -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 *