Change 13096 by jhi@alpha on 2001/11/19 14:28:57
Retract #13082 until a better solution is found:
statics break ithreads.
Affected files ...
.... //depot/perl/regexec.c#205 edit
Differences ...
==== //depot/perl/regexec.c#205 (text) ====
Index: perl/regexec.c
--- perl/regexec.c.~1~ Mon Nov 19 07:45:05 2001
+++ perl/regexec.c Mon Nov 19 07:45:05 2001
@@ -390,9 +390,7 @@
char *check_at = Nullch; /* check substr found at this pos */
#ifdef DEBUGGING
char *i_strpos = strpos;
- static SV *dsv;
- if (!dsv)
- dsv = newSVpvn("", 0);
+ SV *dsv = sv_2mortal(newSVpvn("", 0));
#endif
DEBUG_r({
@@ -1467,9 +1465,7 @@
SV* oreplsv = GvSV(PL_replgv);
bool do_utf8 = DO_UTF8(sv);
#ifdef DEBUGGING
- static SV *dsv;
- if (!dsv)
- dsv = newSVpvn("", 0);
+ SV *dsv = sv_2mortal(newSVpvn("", 0));
#endif
PL_regcc = 0;
@@ -2054,15 +2050,9 @@
#endif
register bool do_utf8 = PL_reg_match_utf8;
#ifdef DEBUGGING
- static SV *dsv0;
- static SV *dsv1;
- static SV *dsv2;
- if (!dsv0)
- dsv0 = newSVpvn("", 0);
- if (!dsv1)
- dsv1 = newSVpvn("", 0);
- if (!dsv2)
- dsv2 = newSVpvn("", 0);
+ SV *dsv0 = sv_2mortal(newSVpvn("", 0));
+ SV *dsv1 = sv_2mortal(newSVpvn("", 0));
+ SV *dsv2 = sv_2mortal(newSVpvn("", 0));
#endif
#ifdef DEBUGGING
End of Patch.