summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-09-26 05:41:02 +0000
committerArtur Bergman <sky@nanisky.com>2001-09-26 05:41:02 +0000
commit3d47000ed389c82b7bce6c0194372bdadfd5f96c (patch)
tree5b1da721c55774b5d8cc9c7dc7c71c69808e49f7 /perl.c
parent975263bc0d9824c253b4010e94f5ee8f44996e6f (diff)
downloadperl-3d47000ed389c82b7bce6c0194372bdadfd5f96c.tar.gz
Move the creation of PL_strtab to perl_construct so we can work
with HV and HEs without running perl_parse. p4raw-id: //depot/perl@12221
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/perl.c b/perl.c
index 9843134b53..a497a39980 100644
--- a/perl.c
+++ b/perl.c
@@ -272,6 +272,18 @@ perl_construct(pTHXx)
New(31337, PL_reentrant_buffer,1, REBUF);
New(31337, PL_reentrant_buffer->tmbuff,1, struct tm);
#endif
+
+ /* Note that strtab is a rather special HV. Assumptions are made
+ about not iterating on it, and not adding tie magic to it.
+ It is properly deallocated in perl_destruct() */
+ PL_strtab = newHV();
+
+#ifdef USE_5005THREADS
+ MUTEX_INIT(&PL_strtab_mutex);
+#endif
+ HvSHAREKEYS_off(PL_strtab); /* mandatory */
+ hv_ksplit(PL_strtab, 512);
+
ENTER;
}
@@ -2586,15 +2598,7 @@ S_init_main_stash(pTHX)
{
GV *gv;
- /* Note that strtab is a rather special HV. Assumptions are made
- about not iterating on it, and not adding tie magic to it.
- It is properly deallocated in perl_destruct() */
- PL_strtab = newHV();
-#ifdef USE_5005THREADS
- MUTEX_INIT(&PL_strtab_mutex);
-#endif
- HvSHAREKEYS_off(PL_strtab); /* mandatory */
- hv_ksplit(PL_strtab, 512);
+
PL_curstash = PL_defstash = newHV();
PL_curstname = newSVpvn("main",4);