From: Nick Ing-Simmons Date: Sun, 26 Jul 1998 14:31:01 +0000 (+0000) Subject: Add dTHR so that it compiles miniperl in threaded mode X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c485e6072d15e92c314a8b9cb6957c3edf13f985;p=p5sagit%2Fp5-mst-13.2.git Add dTHR so that it compiles miniperl in threaded mode p4raw-id: //depot/perl@1667 --- diff --git a/doop.c b/doop.c index 9dc9b04..2685a0b 100644 --- a/doop.c +++ b/doop.c @@ -463,6 +463,7 @@ do_chop(register SV *astr, register SV *sv) { STRLEN len; char *s; + dTHR; if (SvTYPE(sv) == SVt_PVAV) { register I32 i; diff --git a/mg.c b/mg.c index 3efa417..45ec354 100644 --- a/mg.c +++ b/mg.c @@ -1149,6 +1149,7 @@ magic_setpos(SV *sv, MAGIC *mg) SSize_t pos; STRLEN len; STRLEN ulen; + dTHR; mg = 0; @@ -1166,7 +1167,7 @@ magic_setpos(SV *sv, MAGIC *mg) } len = SvPOK(lsv) ? SvCUR(lsv) : sv_len(lsv); - WITH_THR(pos = SvIV(sv) - PL_curcop->cop_arybase); + pos = SvIV(sv) - PL_curcop->cop_arybase; if (IN_UTF8) { ulen = sv_len_utf8(lsv); diff --git a/regcomp.c b/regcomp.c index d1f29d9..f256c4e 100644 --- a/regcomp.c +++ b/regcomp.c @@ -206,6 +206,7 @@ static scan_data_t zero_scan_data = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; STATIC void scan_commit(scan_data_t *data) { + dTHR; STRLEN l = CHR_SVLEN(data->last_found); STRLEN old_l = CHR_SVLEN(*data->longest); @@ -2245,6 +2246,7 @@ regclassutf8(void) I32 n; SV *listsv; U8 flags = 0; + dTHR; if (*PL_regcomp_parse == '^') { /* Complement of range. */ PL_regnaughty++; @@ -2543,6 +2545,7 @@ reganode(U8 op, U32 arg) STATIC void reguni(UV uv, char* s, I32* lenp) { + dTHR; if (SIZE_ONLY) { char tmpbuf[10]; *lenp = uv_to_utf8(tmpbuf, uv) - tmpbuf; @@ -3104,7 +3107,8 @@ re_croak2(const char* pat1,const char* pat2,...) void save_re_context(void) -{ +{ + dTHR; SAVEPPTR(PL_bostr); SAVEPPTR(PL_regprecomp); /* uncompiled string. */ SAVEI32(PL_regnpar); /* () count. */ diff --git a/regexec.c b/regexec.c index 400843b..0ac9173 100644 --- a/regexec.c +++ b/regexec.c @@ -2456,7 +2456,8 @@ reginclass(register char *p, register I32 c) STATIC bool reginclassutf8(regnode *f, U8 *p) -{ +{ + dTHR; char flags = ARG1(f); bool match = FALSE; SV *sv = (SV*)PL_regdata->data[ARG2(f)]; @@ -2493,7 +2494,8 @@ reginclassutf8(regnode *f, U8 *p) STATIC char * reghop(unsigned char *s, I32 off) -{ +{ + dTHR; if (off >= 0) { while (off-- && s < (U8*)PL_regeol) s += UTF8SKIP(s); @@ -2515,6 +2517,7 @@ reghop(unsigned char *s, I32 off) STATIC char * reghopmaybe(unsigned char *s, I32 off) { + dTHR; if (off >= 0) { while (off-- && s < (U8*)PL_regeol) s += UTF8SKIP(s);