diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-19 14:28:57 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-19 14:28:57 +0000 |
commit | 1aa74e471b67abac401c88c9c63d49ddcc53d9d1 (patch) | |
tree | 9cd596714dd0887a0935d816ecc09172b4367a14 /regexec.c | |
parent | 05632f9aff3e990388b86286c6c58111a26f1522 (diff) | |
download | perl-1aa74e471b67abac401c88c9c63d49ddcc53d9d1.tar.gz |
Retract #13082 until a better solution is found:
statics break ithreads.
p4raw-id: //depot/perl@13096
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -390,9 +390,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, 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 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * 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 @@ S_regmatch(pTHX_ regnode *prog) #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 |