diff options
author | Artur Bergman <sky@nanisky.com> | 2001-09-26 05:41:02 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2001-09-26 05:41:02 +0000 |
commit | 3d47000ed389c82b7bce6c0194372bdadfd5f96c (patch) | |
tree | 5b1da721c55774b5d8cc9c7dc7c71c69808e49f7 /perl.c | |
parent | 975263bc0d9824c253b4010e94f5ee8f44996e6f (diff) | |
download | perl-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.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -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); |