From: Nicholas Clark Date: Thu, 18 Jan 2007 23:52:11 +0000 (+0000) Subject: Move C inside the only function that X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23e9d66c1734ef16f12b017bf517a60be8c44e01;p=p5sagit%2Fp5-mst-13.2.git Move C inside the only function that uses it. p4raw-id: //depot/perl@29878 --- diff --git a/sv.c b/sv.c index bbf758f..98f2f81 100644 --- a/sv.c +++ b/sv.c @@ -1036,10 +1036,6 @@ static const struct body_details bodies_by_type[] = { #define new_NOARENAZ(details) \ my_safecalloc((details)->body_size + (details)->offset) -#if defined(DEBUGGING) && !defined(PERL_GLOBAL_STRUCT_PRIVATE) -static bool done_sanity_check; -#endif - STATIC void * S_more_bodies (pTHX_ svtype sv_type) { @@ -1049,10 +1045,9 @@ S_more_bodies (pTHX_ svtype sv_type) const size_t body_size = bdp->body_size; char *start; const char *end; - - assert(bdp->arena_size); - #if defined(DEBUGGING) && !defined(PERL_GLOBAL_STRUCT_PRIVATE) + static bool done_sanity_check; + /* PERL_GLOBAL_STRUCT_PRIVATE cannot coexist with global * variables like done_sanity_check. */ if (!done_sanity_check) { @@ -1065,6 +1060,8 @@ S_more_bodies (pTHX_ svtype sv_type) } #endif + assert(bdp->arena_size); + start = (char*) Perl_get_arena(aTHX_ bdp->arena_size); end = start + bdp->arena_size - body_size;