summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-12 05:10:50 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-12 05:10:50 +0000
commit5c0ca7990f0d90291b9a3d0b6c57bae560b23b52 (patch)
tree26fb0eee534215ebaa9caa2327d1ee6ac37d3bb7 /perl.c
parent8b49bb9af6b73f5b844abedd87486b1c41fc6b01 (diff)
downloadperl-5c0ca7990f0d90291b9a3d0b6c57bae560b23b52.tar.gz
make RE engine threadsafe; -Dusethreads builds, tests on Solaris,
and runs regexes in 1000s of threads without crashing; also fixed statcache not being thread-local p4raw-id: //depot/perl@1448
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 309d75f354..72e2e38b82 100644
--- a/perl.c
+++ b/perl.c
@@ -2776,6 +2776,13 @@ init_main_thread()
formtarget = bodytarget;
thr->errsv = newSVpv("", 0);
(void) find_threadsv("@"); /* Ensure $@ is initialised early */
+
+ maxscream = -1;
+ regcompp = FUNC_NAME_TO_PTR(pregcomp);
+ regexecp = FUNC_NAME_TO_PTR(regexec_flags);
+ regindent = 0;
+ reginterp_cnt = 0;
+
return thr;
}
#endif /* USE_THREADS */