summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2007-04-23 22:04:59 +0000
committerDave Mitchell <davem@fdisolutions.com>2007-04-23 22:04:59 +0000
commit34caed6d4270e612a2c83bf89b8797851c7ed4d1 (patch)
treef08423caad79385a7a960d9e26f1dec678a52c22 /perl.c
parentc944cfb99a453bf0989f7e0433237ee9661e575b (diff)
downloadperl-34caed6d4270e612a2c83bf89b8797851c7ed4d1.tar.gz
make initialisation of PL_sv_no etc unconditional
p4raw-id: //depot/perl@31044
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c63
1 files changed, 29 insertions, 34 deletions
diff --git a/perl.c b/perl.c
index 2ce5b4e1e5..09052d8984 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");