From: Dave Mitchell Date: Mon, 23 Apr 2007 22:04:59 +0000 (+0000) Subject: make initialisation of PL_sv_no etc unconditional X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=34caed6d4270e612a2c83bf89b8797851c7ed4d1;p=p5sagit%2Fp5-mst-13.2.git make initialisation of PL_sv_no etc unconditional p4raw-id: //depot/perl@31044 --- diff --git a/perl.c b/perl.c index 2ce5b4e..09052d8 100644 --- a/perl.c +++ b/perl.c @@ -258,43 +258,38 @@ perl_construct(pTHXx) if (PL_perl_destruct_level > 0) init_interp(); #endif - /* Init the real globals (and main thread)? */ - if (!PL_linestr) { - PL_curcop = &PL_compiling; /* needed by ckWARN, right away */ - - PL_linestr = newSV_type(SVt_PVIV); - SvGROW(PL_linestr, 80); - - if (!SvREADONLY(&PL_sv_undef)) { - /* set read-only and try to insure than we wont see REFCNT==0 - very often */ - - SvREADONLY_on(&PL_sv_undef); - SvREFCNT(&PL_sv_undef) = (~(U32)0)/2; - - sv_setpv(&PL_sv_no,PL_No); - /* value lookup in void context - happens to have the side effect - of caching the numeric forms. */ - SvIV(&PL_sv_no); - SvNV(&PL_sv_no); - SvREADONLY_on(&PL_sv_no); - SvREFCNT(&PL_sv_no) = (~(U32)0)/2; - - sv_setpv(&PL_sv_yes,PL_Yes); - SvIV(&PL_sv_yes); - SvNV(&PL_sv_yes); - SvREADONLY_on(&PL_sv_yes); - SvREFCNT(&PL_sv_yes) = (~(U32)0)/2; - - SvREADONLY_on(&PL_sv_placeholder); - SvREFCNT(&PL_sv_placeholder) = (~(U32)0)/2; - } + PL_curcop = &PL_compiling; /* needed by ckWARN, right away */ + + PL_linestr = newSV_type(SVt_PVIV); + SvGROW(PL_linestr, 80); + + /* set read-only and try to insure than we wont see REFCNT==0 + very often */ + + SvREADONLY_on(&PL_sv_undef); + SvREFCNT(&PL_sv_undef) = (~(U32)0)/2; - PL_sighandlerp = (Sighandler_t) Perl_sighandler; + sv_setpv(&PL_sv_no,PL_No); + /* value lookup in void context - happens to have the side effect + of caching the numeric forms. */ + SvIV(&PL_sv_no); + SvNV(&PL_sv_no); + SvREADONLY_on(&PL_sv_no); + SvREFCNT(&PL_sv_no) = (~(U32)0)/2; + + sv_setpv(&PL_sv_yes,PL_Yes); + SvIV(&PL_sv_yes); + SvNV(&PL_sv_yes); + SvREADONLY_on(&PL_sv_yes); + SvREFCNT(&PL_sv_yes) = (~(U32)0)/2; + + SvREADONLY_on(&PL_sv_placeholder); + SvREFCNT(&PL_sv_placeholder) = (~(U32)0)/2; + + PL_sighandlerp = (Sighandler_t) Perl_sighandler; #ifdef PERL_USES_PL_PIDSTATUS - PL_pidstatus = newHV(); + PL_pidstatus = newHV(); #endif - } PL_rs = newSVpvs("\n");