X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/a1344dd2154b4470e16cac105d3e079da28c896a..cd7a8267705810d57852612d1b551cdb7db4fdb4:/perl.c diff --git a/perl.c b/perl.c index 980bbff..f8c95cf 100644 --- a/perl.c +++ b/perl.c @@ -182,7 +182,7 @@ perl_alloc_using(struct IPerlMem* ipM, struct IPerlMem* ipMS, struct IPerlProc* ipP) { PerlInterpreter *my_perl; - /* New() needs interpreter, so call malloc() instead */ + /* Newx() needs interpreter, so call malloc() instead */ my_perl = (PerlInterpreter*)(*ipM->pMalloc)(ipM, sizeof(PerlInterpreter)); INIT_TLS_AND_INTERP; Zero(my_perl, 1, PerlInterpreter); @@ -218,7 +218,7 @@ perl_alloc(void) dTHX; #endif - /* New() needs interpreter, so call malloc() instead */ + /* Newx() needs interpreter, so call malloc() instead */ my_perl = (PerlInterpreter*)PerlMem_malloc(sizeof(PerlInterpreter)); INIT_TLS_AND_INTERP; @@ -2052,7 +2052,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) CvPADLIST(PL_compcv) = pad_new(0); #ifdef USE_5005THREADS CvOWNER(PL_compcv) = 0; - New(666, CvMUTEXP(PL_compcv), 1, perl_mutex); + Newx(CvMUTEXP(PL_compcv), 1, perl_mutex); MUTEX_INIT(CvMUTEXP(PL_compcv)); #endif /* USE_5005THREADS */ @@ -4397,22 +4397,22 @@ Perl_init_stacks(pTHX) PL_stack_sp = PL_stack_base; PL_stack_max = PL_stack_base + AvMAX(PL_curstack); - New(50,PL_tmps_stack,REASONABLE(128),SV*); + Newx(PL_tmps_stack,REASONABLE(128),SV*); PL_tmps_floor = -1; PL_tmps_ix = -1; PL_tmps_max = REASONABLE(128); - New(54,PL_markstack,REASONABLE(32),I32); + Newx(PL_markstack,REASONABLE(32),I32); PL_markstack_ptr = PL_markstack; PL_markstack_max = PL_markstack + REASONABLE(32); SET_MARK_OFFSET; - New(54,PL_scopestack,REASONABLE(32),I32); + Newx(PL_scopestack,REASONABLE(32),I32); PL_scopestack_ix = 0; PL_scopestack_max = REASONABLE(32); - New(54,PL_savestack,REASONABLE(128),ANY); + Newx(PL_savestack,REASONABLE(128),ANY); PL_savestack_ix = 0; PL_savestack_max = REASONABLE(128); @@ -4952,7 +4952,7 @@ S_init_main_thread(pTHX) #endif XPV *xpv; - Newz(53, thr, 1, struct perl_thread); + Newxz(thr, 1, struct perl_thread); PL_curcop = &PL_compiling; thr->interp = PERL_GET_INTERP; thr->cvcache = newHV(); @@ -4962,8 +4962,8 @@ S_init_main_thread(pTHX) thr->flags = THRf_R_JOINABLE; MUTEX_INIT(&thr->mutex); /* Handcraft thrsv similarly to mess_sv */ - New(53, PL_thrsv, 1, SV); - Newz(53, xpv, 1, XPV); + Newx(PL_thrsv, 1, SV); + Newxz(xpv, 1, XPV); SvFLAGS(PL_thrsv) = SVt_PV; SvANY(PL_thrsv) = (void*)xpv; SvREFCNT(PL_thrsv) = 1 << 30; /* practically infinite */