From: Artur Bergman Date: Wed, 26 Sep 2001 05:41:02 +0000 (+0000) Subject: Move the creation of PL_strtab to perl_construct so we can work X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d47000ed389c82b7bce6c0194372bdadfd5f96c;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/perl.c b/perl.c index 9843134..a497a39 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);