Change 28570 by [EMAIL PROTECTED] on 2006/07/14 07:03:08
Subject: [PATCH] -DPERL_GLOBAL_STRUCT_PRIVATE tweaks (done_sanity_check
global? yech!)
From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
Date: Fri, 14 Jul 2006 09:34:09 +0300 (EEST)
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/hv.c#322 edit
... //depot/perl/sv.c#1285 edit
Differences ...
==== //depot/perl/hv.c#322 (text) ====
Index: perl/hv.c
--- perl/hv.c#321~28419~ 2006-06-23 09:28:03.000000000 -0700
+++ perl/hv.c 2006-07-14 00:03:08.000000000 -0700
@@ -2577,6 +2577,7 @@
SV *
S_refcounted_he_value(pTHX_ const struct refcounted_he *he)
{
+ dVAR;
SV *value;
switch(he->refcounted_he_data[0] & HVrhek_typemask) {
case HVrhek_undef:
@@ -2728,6 +2729,7 @@
Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv,
const char *key, STRLEN klen, int flags, U32 hash)
{
+ dVAR;
/* Just to be awkward, if you're using this interface the UTF-8-or-not-ness
of your key has to exactly match that which is stored. */
SV *value = &PL_sv_placeholder;
==== //depot/perl/sv.c#1285 (text) ====
Index: perl/sv.c
--- perl/sv.c#1284~28535~ 2006-07-10 11:26:25.000000000 -0700
+++ perl/sv.c 2006-07-14 00:03:08.000000000 -0700
@@ -1032,7 +1032,7 @@
#define new_NOARENAZ(details) \
my_safecalloc((details)->body_size + (details)->offset)
-#ifdef DEBUGGING
+#if defined(DEBUGGING) && !defined(PERL_GLOBAL_STRUCT_PRIVATE)
static bool done_sanity_check;
#endif
@@ -1048,7 +1048,9 @@
assert(bdp->arena_size);
-#ifdef DEBUGGING
+#if defined(DEBUGGING) && !defined(PERL_GLOBAL_STRUCT_PRIVATE)
+ /* PERL_GLOBAL_STRUCT_PRIVATE cannot coexist with global
+ * variables like done_sanity_check. */
if (!done_sanity_check) {
unsigned int i = SVt_LAST;
End of Patch.