Change 29878 by [EMAIL PROTECTED] on 2007/01/18 23:52:11
Move C<static bool done_sanity_check;> inside the only function that
uses it.
Affected files ...
... //depot/perl/sv.c#1358 edit
Differences ...
==== //depot/perl/sv.c#1358 (text) ====
Index: perl/sv.c
--- perl/sv.c#1357~29876~ 2007-01-18 15:36:57.000000000 -0800
+++ perl/sv.c 2007-01-18 15:52:11.000000000 -0800
@@ -1036,10 +1036,6 @@
#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 @@
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 @@
}
#endif
+ assert(bdp->arena_size);
+
start = (char*) Perl_get_arena(aTHX_ bdp->arena_size);
end = start + bdp->arena_size - body_size;
End of Patch.