-#define ST(off) stack_base[ax + (off)]
+#define ST(off) PL_stack_base[ax + (off)]
#ifdef CAN_PROTOTYPE
#ifdef PERL_OBJECT
#define XS(name) void name(cv) CV* cv;
#endif
+#define na PL_na
+#define sv_undef PL_sv_undef
+#define sv_yes PL_sv_yes
+#define sv_no PL_sv_no
+
#define dXSARGS \
dSP; dMARK; \
- I32 ax = mark - stack_base + 1; \
+ I32 ax = mark - PL_stack_base + 1; \
I32 items = sp - mark
#define XSANY CvXSUBANY(cv)
#define XSRETURN(off) \
STMT_START { \
- stack_sp = stack_base + ax + ((off) - 1); \
+ PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
return; \
} STMT_END
#define XST_mIV(i,v) (ST(i) = sv_2mortal(newSViv(v)) )
#define XST_mNV(i,v) (ST(i) = sv_2mortal(newSVnv(v)) )
#define XST_mPV(i,v) (ST(i) = sv_2mortal(newSVpv(v,0)))
-#define XST_mNO(i) (ST(i) = &sv_no )
-#define XST_mYES(i) (ST(i) = &sv_yes )
-#define XST_mUNDEF(i) (ST(i) = &sv_undef)
+#define XST_mNO(i) (ST(i) = &PL_sv_no )
+#define XST_mYES(i) (ST(i) = &PL_sv_yes )
+#define XST_mUNDEF(i) (ST(i) = &PL_sv_undef)
#define XSRETURN_IV(v) STMT_START { XST_mIV(0,v); XSRETURN(1); } STMT_END
#define XSRETURN_NV(v) STMT_START { XST_mNV(0,v); XSRETURN(1); } STMT_END
#ifdef XS_VERSION
# define XS_VERSION_BOOTCHECK \
STMT_START { \
+ SV *Sv; \
char *vn = Nullch, *module = SvPV(ST(0),na); \
if (items >= 2) /* version supplied as bootstrap arg */ \
Sv = ST(1); \
#endif
key = AvMAX(av) + 1;
while (key > AvFILLp(av) + 1)
- AvARRAY(av)[--key] = &sv_undef;
+ AvARRAY(av)[--key] = &PL_sv_undef;
while (key) {
sv = AvARRAY(av)[--key];
assert(sv);
- if (sv != &sv_undef) {
+ if (sv != &PL_sv_undef) {
dTHR;
(void)SvREFCNT_inc(sv);
}
}
key = AvARRAY(av) - AvALLOC(av);
while (key)
- AvALLOC(av)[--key] = &sv_undef;
+ AvALLOC(av)[--key] = &PL_sv_undef;
AvREAL_on(av);
}
SvPVX(av) = (char*)AvALLOC(av);
if (AvREAL(av)) {
while (tmp)
- ary[--tmp] = &sv_undef;
+ ary[--tmp] = &PL_sv_undef;
}
if (key > AvMAX(av) - 10) {
resized:
ary = AvALLOC(av) + AvMAX(av) + 1;
tmp = newmax - AvMAX(av);
- if (av == curstack) { /* Oops, grew stack (via av_store()?) */
- stack_sp = AvALLOC(av) + (stack_sp - stack_base);
- stack_base = AvALLOC(av);
- stack_max = stack_base + newmax;
+ if (av == PL_curstack) { /* Oops, grew stack (via av_store()?) */
+ PL_stack_sp = AvALLOC(av) + (PL_stack_sp - PL_stack_base);
+ PL_stack_base = AvALLOC(av);
+ PL_stack_max = PL_stack_base + newmax;
}
}
else {
New(2,AvALLOC(av), newmax+1, SV*);
ary = AvALLOC(av) + 1;
tmp = newmax;
- AvALLOC(av)[0] = &sv_undef; /* For the stacks */
+ AvALLOC(av)[0] = &PL_sv_undef; /* For the stacks */
}
if (AvREAL(av)) {
while (tmp)
- ary[--tmp] = &sv_undef;
+ ary[--tmp] = &PL_sv_undef;
}
SvPVX(av) = (char*)AvALLOC(av);
dTHR;
sv = sv_newmortal();
mg_copy((SV*)av, sv, 0, key);
- av_fetch_sv = sv;
- return &av_fetch_sv;
+ PL_av_fetch_sv = sv;
+ return &PL_av_fetch_sv;
}
}
sv = sv_newmortal();
return av_store(av,key,sv);
}
- if (AvARRAY(av)[key] == &sv_undef) {
+ if (AvARRAY(av)[key] == &PL_sv_undef) {
emptyness:
if (lval) {
sv = NEWSV(6,0);
else if (AvREIFY(av)
&& (!AvARRAY(av)[key] /* eg. @_ could have freed elts */
|| SvTYPE(AvARRAY(av)[key]) == SVTYPEMASK)) {
- AvARRAY(av)[key] = &sv_undef; /* 1/2 reify */
+ AvARRAY(av)[key] = &PL_sv_undef; /* 1/2 reify */
goto emptyness;
}
return &AvARRAY(av)[key];
if (!av)
return 0;
if (!val)
- val = &sv_undef;
+ val = &PL_sv_undef;
if (key < 0) {
key += AvFILL(av) + 1;
if (SvRMAGICAL(av)) {
if (mg_find((SV*)av,'P')) {
- if (val != &sv_undef) {
+ if (val != &PL_sv_undef) {
mg_copy((SV*)av, val, 0, key);
}
return 0;
if (AvFILLp(av) < key) {
if (!AvREAL(av)) {
dTHR;
- if (av == curstack && key > stack_sp - stack_base)
- stack_sp = stack_base + key; /* XPUSH in disguise */
+ if (av == PL_curstack && key > PL_stack_sp - PL_stack_base)
+ PL_stack_sp = PL_stack_base + key; /* XPUSH in disguise */
do
- ary[++AvFILLp(av)] = &sv_undef;
+ ary[++AvFILLp(av)] = &PL_sv_undef;
while (AvFILLp(av) < key);
}
AvFILLp(av) = key;
SvREFCNT_dec(ary[key]);
ary[key] = val;
if (SvSMAGICAL(av)) {
- if (val != &sv_undef) {
+ if (val != &PL_sv_undef) {
MAGIC* mg = SvMAGIC(av);
sv_magic(val, (SV*)av, toLOWER(mg->mg_type), 0, key);
}
key = AvFILLp(av) + 1;
while (key) {
SvREFCNT_dec(ary[--key]);
- ary[key] = &sv_undef;
+ ary[key] = &PL_sv_undef;
}
}
if (key = AvARRAY(av) - AvALLOC(av)) {
MAGIC* mg;
if (!av || AvFILL(av) < 0)
- return &sv_undef;
+ return &PL_sv_undef;
if (SvREADONLY(av))
croak(no_modify);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
PUTBACK;
ENTER;
if (perl_call_method("POP", G_SCALAR)) {
- retval = newSVsv(*stack_sp--);
+ retval = newSVsv(*PL_stack_sp--);
} else {
- retval = &sv_undef;
+ retval = &PL_sv_undef;
}
LEAVE;
POPSTACK;
return retval;
}
retval = AvARRAY(av)[AvFILLp(av)];
- AvARRAY(av)[AvFILLp(av)--] = &sv_undef;
+ AvARRAY(av)[AvFILLp(av)--] = &PL_sv_undef;
if (SvSMAGICAL(av))
mg_set((SV*)av);
return retval;
EXTEND(SP,1+num);
PUSHs(mg->mg_obj);
while (num-- > 0) {
- PUSHs(&sv_undef);
+ PUSHs(&PL_sv_undef);
}
PUTBACK;
ENTER;
ary = AvARRAY(av);
Move(ary, ary + num, i + 1, SV*);
do {
- ary[--num] = &sv_undef;
+ ary[--num] = &PL_sv_undef;
} while (num);
}
}
MAGIC* mg;
if (!av || AvFILL(av) < 0)
- return &sv_undef;
+ return &PL_sv_undef;
if (SvREADONLY(av))
croak(no_modify);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
PUTBACK;
ENTER;
if (perl_call_method("SHIFT", G_SCALAR)) {
- retval = newSVsv(*stack_sp--);
+ retval = newSVsv(*PL_stack_sp--);
} else {
- retval = &sv_undef;
+ retval = &PL_sv_undef;
}
LEAVE;
POPSTACK;
}
retval = *AvARRAY(av);
if (AvREAL(av))
- *AvARRAY(av) = &sv_undef;
+ *AvARRAY(av) = &PL_sv_undef;
SvPVX(av) = (char*)(AvARRAY(av) + 1);
AvMAX(av)--;
AvFILLp(av)--;
if (AvREAL(av)) {
while (key > fill) {
SvREFCNT_dec(ary[key]);
- ary[key--] = &sv_undef;
+ ary[key--] = &PL_sv_undef;
}
}
else {
while (key < fill)
- ary[++key] = &sv_undef;
+ ary[++key] = &PL_sv_undef;
}
AvFILLp(av) = fill;
mg_set((SV*)av);
}
else
- (void)av_store(av,fill,&sv_undef);
+ (void)av_store(av,fill,&PL_sv_undef);
}
#define BGET_pvcontents(arg) arg = pv.xpv_pv
#define BGET_strconst(arg) STMT_START { \
- for (arg = tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
- arg = tokenbuf; \
+ for (arg = PL_tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
+ arg = PL_tokenbuf; \
} STMT_END
#define BGET_double(arg) STMT_START { \
#define BGET_svindex(arg) BGET_objindex(arg, svindex)
#define BGET_opindex(arg) BGET_objindex(arg, opindex)
-#define BSET_ldspecsv(sv, arg) sv = specialsv_list[arg]
+#define BSET_ldspecsv(sv, arg) sv = PL_specialsv_list[arg]
#define BSET_sv_refcnt_add(svrefcnt, arg) svrefcnt += arg
#define BSET_gp_refcnt_add(gprefcnt, arg) gprefcnt += arg
{
opindex arg;
BGET_opindex(arg);
- main_start = arg;
+ PL_main_start = arg;
break;
}
case INSN_MAIN_ROOT: /* 117 */
{
opindex arg;
BGET_opindex(arg);
- main_root = arg;
+ PL_main_root = arg;
break;
}
case INSN_CURPAD: /* 118 */
{
svindex arg;
BGET_svindex(arg);
- BSET_curpad(curpad, arg);
+ BSET_curpad(PL_curpad, arg);
break;
}
default:
;
#define INIT_SPECIALSV_LIST STMT_START { \
- specialsv_list[0] = Nullsv; \
- specialsv_list[1] = &sv_undef; \
- specialsv_list[2] = &sv_yes; \
- specialsv_list[3] = &sv_no; \
+ PL_specialsv_list[0] = Nullsv; \
+ PL_specialsv_list[1] = &PL_sv_undef; \
+ PL_specialsv_list[2] = &PL_sv_yes; \
+ PL_specialsv_list[3] = &PL_sv_no; \
} STMT_END
cx->blk_sub.cv = cv; \
cx->blk_sub.gv = gv; \
cx->blk_sub.hasargs = 0; \
- cx->blk_sub.dfoutgv = defoutgv; \
+ cx->blk_sub.dfoutgv = PL_defoutgv; \
(void)SvREFCNT_inc(cx->blk_sub.dfoutgv)
#define POPSUB(cx) \
#else
#define POPSAVEARRAY() \
STMT_START { \
- SvREFCNT_dec(GvAV(defgv)); \
- GvAV(defgv) = cxsub.savearray; \
+ SvREFCNT_dec(GvAV(PL_defgv)); \
+ GvAV(PL_defgv) = cxsub.savearray; \
} STMT_END
#endif /* USE_THREADS */
};
#define PUSHEVAL(cx,n,fgv) \
- cx->blk_eval.old_in_eval = in_eval; \
+ cx->blk_eval.old_in_eval = PL_in_eval; \
cx->blk_eval.old_op_type = op->op_type; \
cx->blk_eval.old_name = n; \
- cx->blk_eval.old_eval_root = eval_root; \
- cx->blk_eval.cur_text = linestr;
+ cx->blk_eval.old_eval_root = PL_eval_root; \
+ cx->blk_eval.cur_text = PL_linestr;
#define POPEVAL(cx) \
- in_eval = cx->blk_eval.old_in_eval; \
+ PL_in_eval = cx->blk_eval.old_in_eval; \
optype = cx->blk_eval.old_op_type; \
- eval_root = cx->blk_eval.old_eval_root;
+ PL_eval_root = cx->blk_eval.old_eval_root;
/* loop context */
struct block_loop {
};
#define PUSHLOOP(cx, ivar, s) \
- cx->blk_loop.label = curcop->cop_label; \
- cx->blk_loop.resetsp = s - stack_base; \
+ cx->blk_loop.label = PL_curcop->cop_label; \
+ cx->blk_loop.resetsp = s - PL_stack_base; \
cx->blk_loop.redo_op = cLOOP->op_redoop; \
cx->blk_loop.next_op = cLOOP->op_nextop; \
cx->blk_loop.last_op = cLOOP->op_lastop; \
#define POPLOOP1(cx) \
cxloop = cx->blk_loop; /* because DESTROY may clobber *cx */ \
- newsp = stack_base + cxloop.resetsp;
+ newsp = PL_stack_base + cxloop.resetsp;
#define POPLOOP2() \
SvREFCNT_dec(cxloop.iterlval); \
SvREFCNT_dec(*cxloop.itervar); \
*cxloop.itervar = cxloop.itersave; \
} \
- if (cxloop.iterary && cxloop.iterary != curstack) \
+ if (cxloop.iterary && cxloop.iterary != PL_curstack) \
SvREFCNT_dec(cxloop.iterary);
/* context common to subroutines, evals and loops */
/* Enter a block. */
#define PUSHBLOCK(cx,t,sp) CXINC, cx = &cxstack[cxstack_ix], \
cx->cx_type = t, \
- cx->blk_oldsp = sp - stack_base, \
- cx->blk_oldcop = curcop, \
- cx->blk_oldmarksp = markstack_ptr - markstack, \
- cx->blk_oldscopesp = scopestack_ix, \
- cx->blk_oldretsp = retstack_ix, \
- cx->blk_oldpm = curpm, \
+ cx->blk_oldsp = sp - PL_stack_base, \
+ cx->blk_oldcop = PL_curcop, \
+ cx->blk_oldmarksp = PL_markstack_ptr - PL_markstack, \
+ cx->blk_oldscopesp = PL_scopestack_ix, \
+ cx->blk_oldretsp = PL_retstack_ix, \
+ cx->blk_oldpm = PL_curpm, \
cx->blk_gimme = gimme; \
DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Entering block %ld, type %s\n", \
(long)cxstack_ix, block_type[t]); )
/* Exit a block (RETURN and LAST). */
#define POPBLOCK(cx,pm) cx = &cxstack[cxstack_ix--], \
- newsp = stack_base + cx->blk_oldsp, \
- curcop = cx->blk_oldcop, \
- markstack_ptr = markstack + cx->blk_oldmarksp, \
- scopestack_ix = cx->blk_oldscopesp, \
- retstack_ix = cx->blk_oldretsp, \
- pm = cx->blk_oldpm, \
- gimme = cx->blk_gimme; \
+ newsp = PL_stack_base + cx->blk_oldsp, \
+ PL_curcop = cx->blk_oldcop, \
+ PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp, \
+ PL_scopestack_ix = cx->blk_oldscopesp, \
+ PL_retstack_ix = cx->blk_oldretsp, \
+ pm = cx->blk_oldpm, \
+ gimme = cx->blk_gimme; \
DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Leaving block %ld, type %s\n", \
(long)cxstack_ix+1,block_type[cx->cx_type]); )
/* Continue a block elsewhere (NEXT and REDO). */
-#define TOPBLOCK(cx) cx = &cxstack[cxstack_ix], \
- stack_sp = stack_base + cx->blk_oldsp, \
- markstack_ptr = markstack + cx->blk_oldmarksp, \
- scopestack_ix = cx->blk_oldscopesp, \
- retstack_ix = cx->blk_oldretsp
+#define TOPBLOCK(cx) cx = &cxstack[cxstack_ix], \
+ PL_stack_sp = PL_stack_base + cx->blk_oldsp, \
+ PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp, \
+ PL_scopestack_ix = cx->blk_oldscopesp, \
+ PL_retstack_ix = cx->blk_oldretsp
/* substitution context */
struct subst {
typedef struct stackinfo PERL_SI;
-#define cxstack (curstackinfo->si_cxstack)
-#define cxstack_ix (curstackinfo->si_cxix)
-#define cxstack_max (curstackinfo->si_cxmax)
+#define cxstack (PL_curstackinfo->si_cxstack)
+#define cxstack_ix (PL_curstackinfo->si_cxix)
+#define cxstack_max (PL_curstackinfo->si_cxmax)
#ifdef DEBUGGING
-# define SET_MARKBASE curstackinfo->si_markbase = markstack_ptr
+# define SET_MARKBASE PL_curstackinfo->si_markbase = PL_markstack_ptr
#else
# define SET_MARKBASE NOOP
#endif
#define PUSHSTACKi(type) \
STMT_START { \
- PERL_SI *next = curstackinfo->si_next; \
+ PERL_SI *next = PL_curstackinfo->si_next; \
if (!next) { \
next = new_stackinfo(32, 2048/sizeof(PERL_CONTEXT) - 1); \
- next->si_prev = curstackinfo; \
- curstackinfo->si_next = next; \
+ next->si_prev = PL_curstackinfo; \
+ PL_curstackinfo->si_next = next; \
} \
next->si_type = type; \
next->si_cxix = -1; \
AvFILLp(next->si_stack) = 0; \
- SWITCHSTACK(curstack,next->si_stack); \
- curstackinfo = next; \
+ SWITCHSTACK(PL_curstack,next->si_stack); \
+ PL_curstackinfo = next; \
SET_MARKBASE; \
} STMT_END
#define POPSTACK \
STMT_START { \
- PERL_SI *prev = curstackinfo->si_prev; \
+ PERL_SI *prev = PL_curstackinfo->si_prev; \
if (!prev) { \
PerlIO_printf(PerlIO_stderr(), "panic: POPSTACK\n"); \
my_exit(1); \
} \
- SWITCHSTACK(curstack,prev->si_stack); \
+ SWITCHSTACK(PL_curstack,prev->si_stack); \
/* don't free prev here, free them all at the END{} */ \
- curstackinfo = prev; \
+ PL_curstackinfo = prev; \
} STMT_END
#define POPSTACK_TO(s) \
STMT_START { \
- while (curstack != s) { \
+ while (PL_curstack != s) { \
dounwind(-1); \
POPSTACK; \
} \
dTHR;
va_list args;
register I32 i;
- GV* gv = curcop->cop_filegv;
+ GV* gv = PL_curcop->cop_filegv;
#ifdef USE_THREADS
PerlIO_printf(Perl_debug_log, "0x%lx (%s:%ld)\t",
#else
PerlIO_printf(Perl_debug_log, "(%s:%ld)\t",
SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "<free>",
- (long)curcop->cop_line);
+ (long)PL_curcop->cop_line);
#endif /* USE_THREADS */
- for (i=0; i<dlevel; i++)
- PerlIO_printf(Perl_debug_log, "%c%c ",debname[i],debdelim[i]);
+ for (i=0; i<PL_dlevel; i++)
+ PerlIO_printf(Perl_debug_log, "%c%c ",PL_debname[i],PL_debdelim[i]);
va_start(args, pat);
(void) PerlIO_vprintf(Perl_debug_log,pat,args);
deb_growlevel(void)
{
#ifdef DEBUGGING
- dlmax += 128;
- Renew(debname, dlmax, char);
- Renew(debdelim, dlmax, char);
+ PL_dlmax += 128;
+ Renew(PL_debname, PL_dlmax, char);
+ Renew(PL_debdelim, PL_dlmax, char);
#endif /* DEBUGGING */
}
#ifdef DEBUGGING
dTHR;
PerlIO_printf(Perl_debug_log, "%8lx %8lx %8ld %8ld %8ld\n",
- (unsigned long)curstack, (unsigned long)stack_base,
- (long)*markstack_ptr, (long)(stack_sp-stack_base),
- (long)(stack_max-stack_base));
+ (unsigned long)PL_curstack, (unsigned long)PL_stack_base,
+ (long)*PL_markstack_ptr, (long)(PL_stack_sp-PL_stack_base),
+ (long)(PL_stack_max-PL_stack_base));
PerlIO_printf(Perl_debug_log, "%8lx %8lx %8ld %8ld %8ld\n",
- (unsigned long)mainstack, (unsigned long)AvARRAY(curstack),
- (long)mainstack, (long)AvFILLp(curstack), (long)AvMAX(curstack));
+ (unsigned long)PL_mainstack, (unsigned long)AvARRAY(PL_curstack),
+ (long)PL_mainstack, (long)AvFILLp(PL_curstack), (long)AvMAX(PL_curstack));
#endif /* DEBUGGING */
return 0;
}
{
#ifdef DEBUGGING
dTHR;
- I32 top = stack_sp - stack_base;
+ I32 top = PL_stack_sp - PL_stack_base;
register I32 i = top - 30;
- I32 *markscan = curstackinfo->si_markbase;
+ I32 *markscan = PL_curstackinfo->si_markbase;
if (i < 0)
i = 0;
- while (++markscan <= markstack_ptr)
+ while (++markscan <= PL_markstack_ptr)
if (*markscan >= i)
break;
#else
PerlIO_printf(Perl_debug_log, i ? " => ... " : " => ");
#endif /* USE_THREADS */
- if (stack_base[0] != &sv_undef || stack_sp < stack_base)
+ if (PL_stack_base[0] != &PL_sv_undef || PL_stack_sp < PL_stack_base)
PerlIO_printf(Perl_debug_log, " [STACK UNDERFLOW!!!]\n");
do {
++i;
- if (markscan <= markstack_ptr && *markscan < i) {
+ if (markscan <= PL_markstack_ptr && *markscan < i) {
do {
++markscan;
PerlIO_putc(Perl_debug_log, '*');
}
- while (markscan <= markstack_ptr && *markscan < i);
+ while (markscan <= PL_markstack_ptr && *markscan < i);
PerlIO_printf(Perl_debug_log, " ");
}
if (i > top)
break;
- PerlIO_printf(Perl_debug_log, "%-4s ", SvPEEK(stack_base[i]));
+ PerlIO_printf(Perl_debug_log, "%-4s ", SvPEEK(PL_stack_base[i]));
}
while (1);
PerlIO_printf(Perl_debug_log, "\n");
int result;
bool was_fdopen = FALSE;
- forkprocess = 1; /* assume true if no fork */
+ PL_forkprocess = 1; /* assume true if no fork */
if (IoIFP(io)) {
fd = PerlIO_fileno(IoIFP(io));
if (IoTYPE(io) == '-')
result = 0;
- else if (fd <= maxsysfd) {
+ else if (fd <= PL_maxsysfd) {
saveifp = IoIFP(io);
saveofp = IoOFP(io);
savetype = IoTYPE(io);
}
else
result = PerlIO_close(IoIFP(io));
- if (result == EOF && fd > maxsysfd)
+ if (result == EOF && fd > PL_maxsysfd)
PerlIO_printf(PerlIO_stderr(), "Warning: unable to close filehandle %s properly.\n",
GvENAME(gv));
IoOFP(io) = IoIFP(io) = Nullfp;
TAINT_PROPER("piped open");
if (name[strlen(name)-1] == '|') {
name[strlen(name)-1] = '\0' ;
- if (dowarn)
+ if (PL_dowarn)
warn("Can't do bidirectional pipe");
}
fp = PerlProc_popen(name,"w");
}
}
if (!fp) {
- if (dowarn && IoTYPE(io) == '<' && strchr(name, '\n'))
+ if (PL_dowarn && IoTYPE(io) == '<' && strchr(name, '\n'))
warn(warn_nl, "open");
goto say_false;
}
if (IoTYPE(io) &&
IoTYPE(io) != '|' && IoTYPE(io) != '-') {
dTHR;
- if (PerlLIO_fstat(PerlIO_fileno(fp),&statbuf) < 0) {
+ if (PerlLIO_fstat(PerlIO_fileno(fp),&PL_statbuf) < 0) {
(void)PerlIO_close(fp);
goto say_false;
}
- if (S_ISSOCK(statbuf.st_mode))
+ if (S_ISSOCK(PL_statbuf.st_mode))
IoTYPE(io) = 's'; /* in case a socket was passed in to us */
#ifdef HAS_SOCKET
else if (
#ifdef S_IFMT
- !(statbuf.st_mode & S_IFMT)
+ !(PL_statbuf.st_mode & S_IFMT)
#else
!statbuf.st_mode
#endif
SV *sv;
PerlLIO_dup2(PerlIO_fileno(fp), fd);
- sv = *av_fetch(fdpid,PerlIO_fileno(fp),TRUE);
+ sv = *av_fetch(PL_fdpid,PerlIO_fileno(fp),TRUE);
(void)SvUPGRADE(sv, SVt_IV);
pid = SvIVX(sv);
SvIVX(sv) = 0;
- sv = *av_fetch(fdpid,fd,TRUE);
+ sv = *av_fetch(PL_fdpid,fd,TRUE);
(void)SvUPGRADE(sv, SVt_IV);
SvIVX(sv) = pid;
if (!was_fdopen)
}
#if defined(HAS_FCNTL) && defined(F_SETFD)
fd = PerlIO_fileno(fp);
- fcntl(fd,F_SETFD,fd > maxsysfd);
+ fcntl(fd,F_SETFD,fd > PL_maxsysfd);
#endif
IoIFP(io) = fp;
if (writing) {
dTHR;
if (IoTYPE(io) == 's'
- || (IoTYPE(io) == '>' && S_ISCHR(statbuf.st_mode)) ) {
+ || (IoTYPE(io) == '>' && S_ISCHR(PL_statbuf.st_mode)) ) {
if (!(IoOFP(io) = PerlIO_fdopen(PerlIO_fileno(fp),"w"))) {
PerlIO_close(fp);
IoIFP(io) = Nullfp;
int fileuid;
int filegid;
- if (!argvoutgv)
- argvoutgv = gv_fetchpv("ARGVOUT",TRUE,SVt_PVIO);
- if (filemode & (S_ISUID|S_ISGID)) {
- PerlIO_flush(IoIFP(GvIOn(argvoutgv))); /* chmod must follow last write */
+ if (!PL_argvoutgv)
+ PL_argvoutgv = gv_fetchpv("ARGVOUT",TRUE,SVt_PVIO);
+ if (PL_filemode & (S_ISUID|S_ISGID)) {
+ PerlIO_flush(IoIFP(GvIOn(PL_argvoutgv))); /* chmod must follow last write */
#ifdef HAS_FCHMOD
- (void)fchmod(lastfd,filemode);
+ (void)fchmod(PL_lastfd,PL_filemode);
#else
(void)PerlLIO_chmod(oldname,filemode);
#endif
}
- filemode = 0;
+ PL_filemode = 0;
while (av_len(GvAV(gv)) >= 0) {
dTHR;
STRLEN oldlen;
SAVEFREESV(sv);
sv_setsv(GvSV(gv),sv);
SvSETMAGIC(GvSV(gv));
- oldname = SvPVx(GvSV(gv), oldlen);
- if (do_open(gv,oldname,oldlen,inplace!=0,0,0,Nullfp)) {
- if (inplace) {
+ PL_oldname = SvPVx(GvSV(gv), oldlen);
+ if (do_open(gv,PL_oldname,oldlen,PL_inplace!=0,0,0,Nullfp)) {
+ if (PL_inplace) {
TAINT_PROPER("inplace open");
- if (oldlen == 1 && *oldname == '-') {
+ if (oldlen == 1 && *PL_oldname == '-') {
setdefout(gv_fetchpv("STDOUT",TRUE,SVt_PVIO));
return IoIFP(GvIOp(gv));
}
filedev = statbuf.st_dev;
fileino = statbuf.st_ino;
#endif
- filemode = statbuf.st_mode;
- fileuid = statbuf.st_uid;
- filegid = statbuf.st_gid;
- if (!S_ISREG(filemode)) {
+ PL_filemode = PL_statbuf.st_mode;
+ fileuid = PL_statbuf.st_uid;
+ filegid = PL_statbuf.st_gid;
+ if (!S_ISREG(PL_filemode)) {
warn("Can't do inplace edit: %s is not a regular file",
- oldname );
+ PL_oldname );
do_close(gv,FALSE);
continue;
}
- if (*inplace) {
- char *star = strchr(inplace, '*');
+ if (*PL_inplace) {
+ char *star = strchr(PL_inplace, '*');
if (star) {
- char *begin = inplace;
+ char *begin = PL_inplace;
sv_setpvn(sv, "", 0);
do {
sv_catpvn(sv, begin, star - begin);
- sv_catpvn(sv, oldname, oldlen);
+ sv_catpvn(sv, PL_oldname, oldlen);
begin = ++star;
} while ((star = strchr(begin, '*')));
if (*begin)
sv_catpv(sv,begin);
}
else {
- sv_catpv(sv,inplace);
+ sv_catpv(sv,PL_inplace);
}
#ifndef FLEXFILENAMES
if (PerlLIO_stat(SvPVX(sv),&statbuf) >= 0
#endif
#ifdef HAS_RENAME
#ifndef DOSISH
- if (PerlLIO_rename(oldname,SvPVX(sv)) < 0) {
+ if (PerlLIO_rename(PL_oldname,SvPVX(sv)) < 0) {
warn("Can't rename %s to %s: %s, skipping file",
- oldname, SvPVX(sv), Strerror(errno) );
+ PL_oldname, SvPVX(sv), Strerror(errno) );
do_close(gv,FALSE);
continue;
}
else {
#if !defined(DOSISH) && !defined(AMIGAOS)
# ifndef VMS /* Don't delete; use automatic file versioning */
- if (UNLINK(oldname) < 0) {
+ if (UNLINK(PL_oldname) < 0) {
warn("Can't remove %s: %s, skipping file",
- oldname, Strerror(errno) );
+ PL_oldname, Strerror(errno) );
do_close(gv,FALSE);
continue;
}
#endif
}
- sv_setpvn(sv,">",!inplace);
- sv_catpvn(sv,oldname,oldlen);
+ sv_setpvn(sv,">",!PL_inplace);
+ sv_catpvn(sv,PL_oldname,oldlen);
SETERRNO(0,0); /* in case sprintf set errno */
- if (!do_open(argvoutgv,SvPVX(sv),SvCUR(sv),inplace!=0,
+ if (!do_open(PL_argvoutgv,SvPVX(sv),SvCUR(sv),PL_inplace!=0,
O_WRONLY|O_CREAT|OPEN_EXCL,0666,Nullfp)) {
warn("Can't do inplace edit on %s: %s",
- oldname, Strerror(errno) );
+ PL_oldname, Strerror(errno) );
do_close(gv,FALSE);
continue;
}
- setdefout(argvoutgv);
- lastfd = PerlIO_fileno(IoIFP(GvIOp(argvoutgv)));
- (void)PerlLIO_fstat(lastfd,&statbuf);
+ setdefout(PL_argvoutgv);
+ PL_lastfd = PerlIO_fileno(IoIFP(GvIOp(PL_argvoutgv)));
+ (void)PerlLIO_fstat(PL_lastfd,&PL_statbuf);
#ifdef HAS_FCHMOD
- (void)fchmod(lastfd,filemode);
+ (void)fchmod(PL_lastfd,PL_filemode);
#else
# if !(defined(WIN32) && defined(__BORLANDC__))
/* Borland runtime creates a readonly file! */
(void)PerlLIO_chmod(oldname,filemode);
# endif
#endif
- if (fileuid != statbuf.st_uid || filegid != statbuf.st_gid) {
+ if (fileuid != PL_statbuf.st_uid || filegid != PL_statbuf.st_gid) {
#ifdef HAS_FCHOWN
- (void)fchown(lastfd,fileuid,filegid);
+ (void)fchown(PL_lastfd,fileuid,filegid);
#else
#ifdef HAS_CHOWN
(void)PerlLIO_chown(oldname,fileuid,filegid);
}
else
PerlIO_printf(PerlIO_stderr(), "Can't open %s: %s\n",
- SvPV(sv, na), Strerror(errno));
+ SvPV(sv, PL_na), Strerror(errno));
}
- if (inplace) {
- (void)do_close(argvoutgv,FALSE);
+ if (PL_inplace) {
+ (void)do_close(PL_argvoutgv,FALSE);
setdefout(gv_fetchpv("STDOUT",TRUE,SVt_PVIO));
}
return Nullfp;
goto badexit;
}
- sv_setsv(sv,&sv_yes);
+ sv_setsv(sv,&PL_sv_yes);
return;
badexit:
- sv_setsv(sv,&sv_undef);
+ sv_setsv(sv,&PL_sv_undef);
return;
}
#endif
IO *io;
if (!gv)
- gv = argvgv;
+ gv = PL_argvgv;
if (!gv || SvTYPE(gv) != SVt_PVGV) {
if (not_implicit)
SETERRNO(EBADF,SS$_IVCHAN);
io = GvIO(gv);
if (!io) { /* never opened */
if (not_implicit) {
- if (dowarn)
+ if (PL_dowarn)
warn("Close on unopened file <%s>",GvENAME(gv));
SETERRNO(EBADF,SS$_IVCHAN);
}
PerlIO_set_cnt(IoIFP(io),-1);
}
if (op->op_flags & OPf_SPECIAL) { /* not necessarily a real EOF yet? */
- if (!nextargv(argvgv)) /* get another fp handy */
+ if (!nextargv(PL_argvgv)) /* get another fp handy */
return TRUE;
}
else
#endif
return PerlIO_tell(fp);
}
- if (dowarn)
+ if (PL_dowarn)
warn("tell() on unopened file");
SETERRNO(EBADF,RMS$_IFI);
return -1L;
#endif
return PerlIO_seek(fp, pos, whence) >= 0;
}
- if (dowarn)
+ if (PL_dowarn)
warn("seek() on unopened file");
SETERRNO(EBADF,RMS$_IFI);
return FALSE;
if (gv && (io = GvIO(gv)) && (fp = IoIFP(io)))
return PerlLIO_lseek(PerlIO_fileno(fp), pos, whence);
- if (dowarn)
+ if (PL_dowarn)
warn("sysseek() on unopened file");
SETERRNO(EBADF,RMS$_IFI);
return -1L;
/* assuming fp is checked earlier */
if (!sv)
return TRUE;
- if (ofmt) {
+ if (PL_ofmt) {
if (SvGMAGICAL(sv))
mg_get(sv);
if (SvIOK(sv) && SvIVX(sv) != 0) {
- PerlIO_printf(fp, ofmt, (double)SvIVX(sv));
+ PerlIO_printf(fp, PL_ofmt, (double)SvIVX(sv));
return !PerlIO_error(fp);
}
if ( (SvNOK(sv) && SvNVX(sv) != 0.0)
|| (looks_like_number(sv) && sv_2nv(sv) != 0.0) ) {
- PerlIO_printf(fp, ofmt, SvNVX(sv));
+ PerlIO_printf(fp, PL_ofmt, SvNVX(sv));
return !PerlIO_error(fp);
}
}
switch (SvTYPE(sv)) {
case SVt_NULL:
- if (dowarn)
+ if (PL_dowarn)
warn(warn_uninit);
return TRUE;
case SVt_IV:
do_fstat:
io = GvIO(tmpgv);
if (io && IoIFP(io)) {
- statgv = tmpgv;
- sv_setpv(statname,"");
- laststype = OP_STAT;
- return (laststatval = PerlLIO_fstat(PerlIO_fileno(IoIFP(io)), &statcache));
+ PL_statgv = tmpgv;
+ sv_setpv(PL_statname,"");
+ PL_laststype = OP_STAT;
+ return (PL_laststatval = PerlLIO_fstat(PerlIO_fileno(IoIFP(io)), &PL_statcache));
}
else {
- if (tmpgv == defgv)
- return laststatval;
- if (dowarn)
+ if (tmpgv == PL_defgv)
+ return PL_laststatval;
+ if (PL_dowarn)
warn("Stat on unopened file <%s>",
GvENAME(tmpgv));
- statgv = Nullgv;
- sv_setpv(statname,"");
- return (laststatval = -1);
+ PL_statgv = Nullgv;
+ sv_setpv(PL_statname,"");
+ return (PL_laststatval = -1);
}
}
else {
goto do_fstat;
}
- s = SvPV(sv, na);
- statgv = Nullgv;
- sv_setpv(statname, s);
- laststype = OP_STAT;
- laststatval = PerlLIO_stat(s, &statcache);
- if (laststatval < 0 && dowarn && strchr(s, '\n'))
+ s = SvPV(sv, PL_na);
+ PL_statgv = Nullgv;
+ sv_setpv(PL_statname, s);
+ PL_laststype = OP_STAT;
+ PL_laststatval = PerlLIO_stat(s, &PL_statcache);
+ if (PL_laststatval < 0 && PL_dowarn && strchr(s, '\n'))
warn(warn_nl, "stat");
- return laststatval;
+ return PL_laststatval;
}
}
SV *sv;
if (op->op_flags & OPf_REF) {
EXTEND(SP,1);
- if (cGVOP->op_gv == defgv) {
- if (laststype != OP_LSTAT)
+ if (cGVOP->op_gv == PL_defgv) {
+ if (PL_laststype != OP_LSTAT)
croak("The stat preceding -l _ wasn't an lstat");
- return laststatval;
+ return PL_laststatval;
}
croak("You can't use -l on a filehandle");
}
- laststype = OP_LSTAT;
- statgv = Nullgv;
+ PL_laststype = OP_LSTAT;
+ PL_statgv = Nullgv;
sv = POPs;
PUTBACK;
- sv_setpv(statname,SvPV(sv, na));
+ sv_setpv(PL_statname,SvPV(sv, PL_na));
#ifdef HAS_LSTAT
- laststatval = PerlLIO_lstat(SvPV(sv, na),&statcache);
+ PL_laststatval = PerlLIO_lstat(SvPV(sv, PL_na),&PL_statcache);
#else
laststatval = PerlLIO_stat(SvPV(sv, na),&statcache);
#endif
- if (laststatval < 0 && dowarn && strchr(SvPV(sv, na), '\n'))
+ if (PL_laststatval < 0 && PL_dowarn && strchr(SvPV(sv, PL_na), '\n'))
warn(warn_nl, "lstat");
- return laststatval;
+ return PL_laststatval;
}
bool
if (sp > mark) {
dTHR;
- New(401,Argv, sp - mark + 1, char*);
- a = Argv;
+ New(401,PL_Argv, sp - mark + 1, char*);
+ a = PL_Argv;
while (++mark <= sp) {
if (*mark)
- *a++ = SvPVx(*mark, na);
+ *a++ = SvPVx(*mark, PL_na);
else
*a++ = "";
}
*a = Nullch;
- if (*Argv[0] != '/') /* will execvp use PATH? */
+ if (*PL_Argv[0] != '/') /* will execvp use PATH? */
TAINT_ENV(); /* testing IFS here is overkill, probably */
- if (really && *(tmps = SvPV(really, na)))
- PerlProc_execvp(tmps,Argv);
+ if (really && *(tmps = SvPV(really, PL_na)))
+ PerlProc_execvp(tmps,PL_Argv);
else
- PerlProc_execvp(Argv[0],Argv);
- if (dowarn)
- warn("Can't exec \"%s\": %s", Argv[0], Strerror(errno));
+ PerlProc_execvp(PL_Argv[0],PL_Argv);
+ if (PL_dowarn)
+ warn("Can't exec \"%s\": %s", PL_Argv[0], Strerror(errno));
}
do_execfree();
return FALSE;
void
do_execfree(void)
{
- if (Argv) {
- Safefree(Argv);
- Argv = Null(char **);
+ if (PL_Argv) {
+ Safefree(PL_Argv);
+ PL_Argv = Null(char **);
}
- if (Cmd) {
- Safefree(Cmd);
- Cmd = Nullch;
+ if (PL_Cmd) {
+ Safefree(PL_Cmd);
+ PL_Cmd = Nullch;
}
}
/* save an extra exec if possible */
#ifdef CSH
- if (strnEQ(cmd,cshname,cshlen) && strnEQ(cmd+cshlen," -c",3)) {
+ if (strnEQ(cmd,PL_cshname,PL_cshlen) && strnEQ(cmd+PL_cshlen," -c",3)) {
strcpy(flags,"-c");
- s = cmd+cshlen+3;
+ s = cmd+PL_cshlen+3;
if (*s == 'f') {
s++;
strcat(flags,"f");
*--s = '\0';
if (s[-1] == '\'') {
*--s = '\0';
- PerlProc_execl(cshname,"csh", flags,ncmd,(char*)0);
+ PerlProc_execl(PL_cshname,"csh", flags,ncmd,(char*)0);
*s = '\'';
return FALSE;
}
break;
}
doshell:
- PerlProc_execl(sh_path, "sh", "-c", cmd, (char*)0);
+ PerlProc_execl(PL_sh_path, "sh", "-c", cmd, (char*)0);
return FALSE;
}
}
- New(402,Argv, (s - cmd) / 2 + 2, char*);
- Cmd = savepvn(cmd, s-cmd);
- a = Argv;
- for (s = Cmd; *s;) {
+ New(402,PL_Argv, (s - cmd) / 2 + 2, char*);
+ PL_Cmd = savepvn(cmd, s-cmd);
+ a = PL_Argv;
+ for (s = PL_Cmd; *s;) {
while (*s && isSPACE(*s)) s++;
if (*s)
*(a++) = s;
*s++ = '\0';
}
*a = Nullch;
- if (Argv[0]) {
- PerlProc_execvp(Argv[0],Argv);
+ if (PL_Argv[0]) {
+ PerlProc_execvp(PL_Argv[0],PL_Argv);
if (errno == ENOEXEC) { /* for system V NIH syndrome */
do_execfree();
goto doshell;
}
- if (dowarn)
- warn("Can't exec \"%s\": %s", Argv[0], Strerror(errno));
+ if (PL_dowarn)
+ warn("Can't exec \"%s\": %s", PL_Argv[0], Strerror(errno));
}
do_execfree();
return FALSE;
SV **oldmark = mark;
#define APPLY_TAINT_PROPER() \
- STMT_START { \
- if (tainting && tainted) { goto taint_proper_label; } \
+ STMT_START { \
+ if (PL_tainting && PL_tainted) { goto taint_proper_label; } \
} STMT_END
/* This is a first heuristic; it doesn't catch tainting magic. */
- if (tainting) {
+ if (PL_tainting) {
while (++mark <= sp) {
if (SvTAINTED(*mark)) {
TAINT;
APPLY_TAINT_PROPER();
tot = sp - mark;
while (++mark <= sp) {
- char *name = SvPVx(*mark, na);
+ char *name = SvPVx(*mark, PL_na);
APPLY_TAINT_PROPER();
if (PerlLIO_chmod(name, val))
tot--;
APPLY_TAINT_PROPER();
tot = sp - mark;
while (++mark <= sp) {
- char *name = SvPVx(*mark, na);
+ char *name = SvPVx(*mark, PL_na);
APPLY_TAINT_PROPER();
if (PerlLIO_chown(name, val, val2))
tot--;
APPLY_TAINT_PROPER();
if (mark == sp)
break;
- s = SvPVx(*++mark, na);
+ s = SvPVx(*++mark, PL_na);
if (isUPPER(*s)) {
if (*s == 'S' && s[1] == 'I' && s[2] == 'G')
s += 3;
APPLY_TAINT_PROPER();
tot = sp - mark;
while (++mark <= sp) {
- s = SvPVx(*mark, na);
+ s = SvPVx(*mark, PL_na);
APPLY_TAINT_PROPER();
- if (euid || unsafe) {
+ if (PL_euid || PL_unsafe) {
if (UNLINK(s))
tot--;
}
else { /* don't let root wipe out directories without -U */
#ifdef HAS_LSTAT
- if (PerlLIO_lstat(s,&statbuf) < 0 || S_ISDIR(statbuf.st_mode))
+ if (PerlLIO_lstat(s,&PL_statbuf) < 0 || S_ISDIR(PL_statbuf.st_mode))
#else
if (PerlLIO_stat(s,&statbuf) < 0 || S_ISDIR(statbuf.st_mode))
#endif
APPLY_TAINT_PROPER();
tot = sp - mark;
while (++mark <= sp) {
- char *name = SvPVx(*mark, na);
+ char *name = SvPVx(*mark, PL_na);
APPLY_TAINT_PROPER();
if (PerlLIO_utime(name, &utbuf))
tot--;
return (bit & statbufp->st_mode) ? TRUE : FALSE;
#else /* ! DOSISH */
- if ((effective ? euid : uid) == 0) { /* root is special */
+ if ((effective ? PL_euid : PL_uid) == 0) { /* root is special */
if (bit == S_IXUSR) {
if (statbufp->st_mode & 0111 || S_ISDIR(statbufp->st_mode))
return TRUE;
return TRUE; /* root reads and writes anything */
return FALSE;
}
- if (statbufp->st_uid == (effective ? euid : uid) ) {
+ if (statbufp->st_uid == (effective ? PL_euid : PL_uid) ) {
if (statbufp->st_mode & bit)
return TRUE; /* ok as "user" */
}
I32
ingroup(I32 testgid, I32 effective)
{
- if (testgid == (effective ? egid : gid))
+ if (testgid == (effective ? PL_egid : PL_gid))
return TRUE;
#ifdef HAS_GETGROUPS
#ifndef NGROUPS
max = AvFILL(av);
for (i = 0; i <= max; i++) {
sv = (SV*)av_fetch(av, i, FALSE);
- if (sv && ((sv = *(SV**)sv), sv != &sv_undef))
+ if (sv && ((sv = *(SV**)sv), sv != &PL_sv_undef))
do_chop(astr, sv);
}
return;
STRLEN len;
char *s;
- if (RsSNARF(rs))
+ if (RsSNARF(PL_rs))
return 0;
count = 0;
if (SvTYPE(sv) == SVt_PVAV) {
max = AvFILL(av);
for (i = 0; i <= max; i++) {
sv = (SV*)av_fetch(av, i, FALSE);
- if (sv && ((sv = *(SV**)sv), sv != &sv_undef))
+ if (sv && ((sv = *(SV**)sv), sv != &PL_sv_undef))
count += do_chomp(sv);
}
return count;
s = SvPV_force(sv, len);
if (s && len) {
s += --len;
- if (RsPARA(rs)) {
+ if (RsPARA(PL_rs)) {
if (*s != '\n')
goto nope;
++count;
}
else {
STRLEN rslen;
- char *rsptr = SvPV(rs, rslen);
+ char *rsptr = SvPV(PL_rs, rslen);
if (rslen == 1) {
if (*s != *rsptr)
goto nope;
len = leftlen < rightlen ? leftlen : rightlen;
lensave = len;
if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) {
- dc = SvPV_force(sv, na);
+ dc = SvPV_force(sv, PL_na);
if (SvCUR(sv) < len) {
dc = SvGROW(sv, len + 1);
(void)memzero(dc + SvCUR(sv), len - SvCUR(sv) + 1);
#ifdef DEBUGGING
dTHR;
PerlIO_setlinebuf(Perl_debug_log);
- if (main_root)
- dump_op(main_root);
- dump_packsubs(defstash);
+ if (PL_main_root)
+ dump_op(PL_main_root);
+ dump_packsubs(PL_defstash);
#endif /* DEBUGGING */
}
if (GvFORM(gv))
dump_form(gv);
if (HeKEY(entry)[HeKLEN(entry)-1] == ':' &&
- (hv = GvHV(gv)) && HvNAME(hv) && hv != defstash)
+ (hv = GvHV(gv)) && HvNAME(hv) && hv != PL_defstash)
dump_packsubs(hv); /* nested package */
}
}
dump_eval(void)
{
#ifdef DEBUGGING
- dump_op(eval_root);
+ dump_op(PL_eval_root);
#endif /* DEBUGGING */
}
}
else
PerlIO_printf(Perl_debug_log, "DONE\n");
- dumplvl++;
+ PL_dumplvl++;
if (o->op_targ) {
if (o->op_type == OP_NULL)
dump(" (was %s)\n", op_name[o->op_targ]);
ENTER;
SAVEFREESV(tmpsv);
gv_fullname3(tmpsv, cGVOPo->op_gv, Nullch);
- dump("GV = %s\n", SvPV(tmpsv, na));
+ dump("GV = %s\n", SvPV(tmpsv, PL_na));
LEAVE;
}
else
for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling)
dump_op(kid);
}
- dumplvl--;
+ PL_dumplvl--;
dump("}\n");
#endif /* DEBUGGING */
}
return;
}
sv = sv_newmortal();
- dumplvl++;
+ PL_dumplvl++;
PerlIO_printf(Perl_debug_log, "{\n");
gv_fullname3(sv, gv, Nullch);
dump("GV_NAME = %s", SvPVX(sv));
dump("-> %s", SvPVX(sv));
}
dump("\n");
- dumplvl--;
+ PL_dumplvl--;
dump("}\n");
#endif /* DEBUGGING */
}
return;
}
dump("{\n");
- dumplvl++;
+ PL_dumplvl++;
if (pm->op_pmflags & PMf_ONCE)
ch = '?';
else
SvREFCNT_dec(tmpsv);
}
- dumplvl--;
+ PL_dumplvl--;
dump("}\n");
#endif /* DEBUGGING */
}
va_list args;
va_start(args, pat);
- for (i = dumplvl*4; i; i--)
+ for (i = PL_dumplvl*4; i; i--)
(void)PerlIO_putc(Perl_debug_log,' ');
PerlIO_vprintf(Perl_debug_log,pat,args);
va_end(args);
my ($sym) = @_;
hide($sym, "Perl_$sym");
}
+sub embedvar ($) {
+ my ($sym) = @_;
+# hide($sym, "Perl_$sym");
+ return '';
+}
+
sub multon ($$$) {
my ($sym,$pre,$ptr) = @_;
- hide($sym, "($ptr$pre$sym)");
+ hide("PL_$sym", "($ptr$pre$sym)");
}
sub multoff ($$) {
my ($sym,$pre) = @_;
- hide("$pre$sym", $sym);
+ hide("$pre$sym", "PL_$sym");
}
unlink 'embed.h';
END
for $sym (sort keys %intrp) {
- print EM embed($sym);
+ print EM embedvar($sym);
}
print EM <<'END';
END
for $sym (sort keys %thread) {
- print EM embed($sym);
+ print EM embedvar($sym);
}
print EM <<'END';
END
for $sym (sort keys %globvar) {
- print EM embed($sym);
+ print EM embedvar($sym);
}
print EM <<'END';
#ifndef USE_THREADS
/* If we do not have threads then per-thread vars are per-interpreter */
-#define Sv (curinterp->TSv)
-#define Xpv (curinterp->TXpv)
-#define av_fetch_sv (curinterp->Tav_fetch_sv)
-#define bodytarget (curinterp->Tbodytarget)
-#define bostr (curinterp->Tbostr)
-#define chopset (curinterp->Tchopset)
-#define colors (curinterp->Tcolors)
-#define colorset (curinterp->Tcolorset)
-#define curcop (curinterp->Tcurcop)
-#define curpad (curinterp->Tcurpad)
-#define curpm (curinterp->Tcurpm)
-#define curstack (curinterp->Tcurstack)
-#define curstackinfo (curinterp->Tcurstackinfo)
-#define curstash (curinterp->Tcurstash)
-#define defoutgv (curinterp->Tdefoutgv)
-#define defstash (curinterp->Tdefstash)
-#define delaymagic (curinterp->Tdelaymagic)
-#define dirty (curinterp->Tdirty)
-#define extralen (curinterp->Textralen)
-#define firstgv (curinterp->Tfirstgv)
-#define formtarget (curinterp->Tformtarget)
-#define hv_fetch_ent_mh (curinterp->Thv_fetch_ent_mh)
-#define hv_fetch_sv (curinterp->Thv_fetch_sv)
-#define in_eval (curinterp->Tin_eval)
-#define last_in_gv (curinterp->Tlast_in_gv)
-#define lastgotoprobe (curinterp->Tlastgotoprobe)
-#define lastscream (curinterp->Tlastscream)
-#define localizing (curinterp->Tlocalizing)
-#define mainstack (curinterp->Tmainstack)
-#define markstack (curinterp->Tmarkstack)
-#define markstack_max (curinterp->Tmarkstack_max)
-#define markstack_ptr (curinterp->Tmarkstack_ptr)
-#define maxscream (curinterp->Tmaxscream)
-#define modcount (curinterp->Tmodcount)
-#define nrs (curinterp->Tnrs)
-#define ofs (curinterp->Tofs)
-#define ofslen (curinterp->Tofslen)
-#define op (curinterp->Top)
-#define opsave (curinterp->Topsave)
-#define reg_eval_set (curinterp->Treg_eval_set)
-#define reg_flags (curinterp->Treg_flags)
-#define reg_start_tmp (curinterp->Treg_start_tmp)
-#define reg_start_tmpl (curinterp->Treg_start_tmpl)
-#define regbol (curinterp->Tregbol)
-#define regcc (curinterp->Tregcc)
-#define regcode (curinterp->Tregcode)
-#define regcomp_parse (curinterp->Tregcomp_parse)
-#define regcomp_rx (curinterp->Tregcomp_rx)
-#define regcompp (curinterp->Tregcompp)
-#define regdata (curinterp->Tregdata)
-#define regdummy (curinterp->Tregdummy)
-#define regendp (curinterp->Tregendp)
-#define regeol (curinterp->Tregeol)
-#define regexecp (curinterp->Tregexecp)
-#define regflags (curinterp->Tregflags)
-#define regindent (curinterp->Tregindent)
-#define reginput (curinterp->Treginput)
-#define reginterp_cnt (curinterp->Treginterp_cnt)
-#define reglastparen (curinterp->Treglastparen)
-#define regnarrate (curinterp->Tregnarrate)
-#define regnaughty (curinterp->Tregnaughty)
-#define regnpar (curinterp->Tregnpar)
-#define regprecomp (curinterp->Tregprecomp)
-#define regprev (curinterp->Tregprev)
-#define regprogram (curinterp->Tregprogram)
-#define regsawback (curinterp->Tregsawback)
-#define regseen (curinterp->Tregseen)
-#define regsize (curinterp->Tregsize)
-#define regstartp (curinterp->Tregstartp)
-#define regtill (curinterp->Tregtill)
-#define regxend (curinterp->Tregxend)
-#define restartop (curinterp->Trestartop)
-#define retstack (curinterp->Tretstack)
-#define retstack_ix (curinterp->Tretstack_ix)
-#define retstack_max (curinterp->Tretstack_max)
-#define rs (curinterp->Trs)
-#define savestack (curinterp->Tsavestack)
-#define savestack_ix (curinterp->Tsavestack_ix)
-#define savestack_max (curinterp->Tsavestack_max)
-#define scopestack (curinterp->Tscopestack)
-#define scopestack_ix (curinterp->Tscopestack_ix)
-#define scopestack_max (curinterp->Tscopestack_max)
-#define screamfirst (curinterp->Tscreamfirst)
-#define screamnext (curinterp->Tscreamnext)
-#define secondgv (curinterp->Tsecondgv)
-#define seen_evals (curinterp->Tseen_evals)
-#define seen_zerolen (curinterp->Tseen_zerolen)
-#define sortcop (curinterp->Tsortcop)
-#define sortcxix (curinterp->Tsortcxix)
-#define sortstash (curinterp->Tsortstash)
-#define stack_base (curinterp->Tstack_base)
-#define stack_max (curinterp->Tstack_max)
-#define stack_sp (curinterp->Tstack_sp)
-#define start_env (curinterp->Tstart_env)
-#define statbuf (curinterp->Tstatbuf)
-#define statcache (curinterp->Tstatcache)
-#define statgv (curinterp->Tstatgv)
-#define statname (curinterp->Tstatname)
-#define tainted (curinterp->Ttainted)
-#define timesbuf (curinterp->Ttimesbuf)
-#define tmps_floor (curinterp->Ttmps_floor)
-#define tmps_ix (curinterp->Ttmps_ix)
-#define tmps_max (curinterp->Ttmps_max)
-#define tmps_stack (curinterp->Ttmps_stack)
-#define top_env (curinterp->Ttop_env)
-#define toptarget (curinterp->Ttoptarget)
+#define PL_Sv (curinterp->TSv)
+#define PL_Xpv (curinterp->TXpv)
+#define PL_av_fetch_sv (curinterp->Tav_fetch_sv)
+#define PL_bodytarget (curinterp->Tbodytarget)
+#define PL_bostr (curinterp->Tbostr)
+#define PL_chopset (curinterp->Tchopset)
+#define PL_colors (curinterp->Tcolors)
+#define PL_colorset (curinterp->Tcolorset)
+#define PL_curcop (curinterp->Tcurcop)
+#define PL_curpad (curinterp->Tcurpad)
+#define PL_curpm (curinterp->Tcurpm)
+#define PL_curstack (curinterp->Tcurstack)
+#define PL_curstackinfo (curinterp->Tcurstackinfo)
+#define PL_curstash (curinterp->Tcurstash)
+#define PL_defoutgv (curinterp->Tdefoutgv)
+#define PL_defstash (curinterp->Tdefstash)
+#define PL_delaymagic (curinterp->Tdelaymagic)
+#define PL_dirty (curinterp->Tdirty)
+#define PL_extralen (curinterp->Textralen)
+#define PL_firstgv (curinterp->Tfirstgv)
+#define PL_formtarget (curinterp->Tformtarget)
+#define PL_hv_fetch_ent_mh (curinterp->Thv_fetch_ent_mh)
+#define PL_hv_fetch_sv (curinterp->Thv_fetch_sv)
+#define PL_in_eval (curinterp->Tin_eval)
+#define PL_last_in_gv (curinterp->Tlast_in_gv)
+#define PL_lastgotoprobe (curinterp->Tlastgotoprobe)
+#define PL_lastscream (curinterp->Tlastscream)
+#define PL_localizing (curinterp->Tlocalizing)
+#define PL_mainstack (curinterp->Tmainstack)
+#define PL_markstack (curinterp->Tmarkstack)
+#define PL_markstack_max (curinterp->Tmarkstack_max)
+#define PL_markstack_ptr (curinterp->Tmarkstack_ptr)
+#define PL_maxscream (curinterp->Tmaxscream)
+#define PL_modcount (curinterp->Tmodcount)
+#define PL_nrs (curinterp->Tnrs)
+#define PL_ofs (curinterp->Tofs)
+#define PL_ofslen (curinterp->Tofslen)
+#define PL_op (curinterp->Top)
+#define PL_opsave (curinterp->Topsave)
+#define PL_reg_eval_set (curinterp->Treg_eval_set)
+#define PL_reg_flags (curinterp->Treg_flags)
+#define PL_reg_start_tmp (curinterp->Treg_start_tmp)
+#define PL_reg_start_tmpl (curinterp->Treg_start_tmpl)
+#define PL_regbol (curinterp->Tregbol)
+#define PL_regcc (curinterp->Tregcc)
+#define PL_regcode (curinterp->Tregcode)
+#define PL_regcomp_parse (curinterp->Tregcomp_parse)
+#define PL_regcomp_rx (curinterp->Tregcomp_rx)
+#define PL_regcompp (curinterp->Tregcompp)
+#define PL_regdata (curinterp->Tregdata)
+#define PL_regdummy (curinterp->Tregdummy)
+#define PL_regendp (curinterp->Tregendp)
+#define PL_regeol (curinterp->Tregeol)
+#define PL_regexecp (curinterp->Tregexecp)
+#define PL_regflags (curinterp->Tregflags)
+#define PL_regindent (curinterp->Tregindent)
+#define PL_reginput (curinterp->Treginput)
+#define PL_reginterp_cnt (curinterp->Treginterp_cnt)
+#define PL_reglastparen (curinterp->Treglastparen)
+#define PL_regnarrate (curinterp->Tregnarrate)
+#define PL_regnaughty (curinterp->Tregnaughty)
+#define PL_regnpar (curinterp->Tregnpar)
+#define PL_regprecomp (curinterp->Tregprecomp)
+#define PL_regprev (curinterp->Tregprev)
+#define PL_regprogram (curinterp->Tregprogram)
+#define PL_regsawback (curinterp->Tregsawback)
+#define PL_regseen (curinterp->Tregseen)
+#define PL_regsize (curinterp->Tregsize)
+#define PL_regstartp (curinterp->Tregstartp)
+#define PL_regtill (curinterp->Tregtill)
+#define PL_regxend (curinterp->Tregxend)
+#define PL_restartop (curinterp->Trestartop)
+#define PL_retstack (curinterp->Tretstack)
+#define PL_retstack_ix (curinterp->Tretstack_ix)
+#define PL_retstack_max (curinterp->Tretstack_max)
+#define PL_rs (curinterp->Trs)
+#define PL_savestack (curinterp->Tsavestack)
+#define PL_savestack_ix (curinterp->Tsavestack_ix)
+#define PL_savestack_max (curinterp->Tsavestack_max)
+#define PL_scopestack (curinterp->Tscopestack)
+#define PL_scopestack_ix (curinterp->Tscopestack_ix)
+#define PL_scopestack_max (curinterp->Tscopestack_max)
+#define PL_screamfirst (curinterp->Tscreamfirst)
+#define PL_screamnext (curinterp->Tscreamnext)
+#define PL_secondgv (curinterp->Tsecondgv)
+#define PL_seen_evals (curinterp->Tseen_evals)
+#define PL_seen_zerolen (curinterp->Tseen_zerolen)
+#define PL_sortcop (curinterp->Tsortcop)
+#define PL_sortcxix (curinterp->Tsortcxix)
+#define PL_sortstash (curinterp->Tsortstash)
+#define PL_stack_base (curinterp->Tstack_base)
+#define PL_stack_max (curinterp->Tstack_max)
+#define PL_stack_sp (curinterp->Tstack_sp)
+#define PL_start_env (curinterp->Tstart_env)
+#define PL_statbuf (curinterp->Tstatbuf)
+#define PL_statcache (curinterp->Tstatcache)
+#define PL_statgv (curinterp->Tstatgv)
+#define PL_statname (curinterp->Tstatname)
+#define PL_tainted (curinterp->Ttainted)
+#define PL_timesbuf (curinterp->Ttimesbuf)
+#define PL_tmps_floor (curinterp->Ttmps_floor)
+#define PL_tmps_ix (curinterp->Ttmps_ix)
+#define PL_tmps_max (curinterp->Ttmps_max)
+#define PL_tmps_stack (curinterp->Ttmps_stack)
+#define PL_top_env (curinterp->Ttop_env)
+#define PL_toptarget (curinterp->Ttoptarget)
#endif /* !USE_THREADS */
/* These are always per-interpreter if there is more than one */
-#define Argv (curinterp->IArgv)
-#define Cmd (curinterp->ICmd)
-#define DBcv (curinterp->IDBcv)
-#define DBgv (curinterp->IDBgv)
-#define DBline (curinterp->IDBline)
-#define DBsignal (curinterp->IDBsignal)
-#define DBsingle (curinterp->IDBsingle)
-#define DBsub (curinterp->IDBsub)
-#define DBtrace (curinterp->IDBtrace)
-#define ampergv (curinterp->Iampergv)
-#define archpat_auto (curinterp->Iarchpat_auto)
-#define argvgv (curinterp->Iargvgv)
-#define argvoutgv (curinterp->Iargvoutgv)
-#define basetime (curinterp->Ibasetime)
-#define beginav (curinterp->Ibeginav)
-#define cddir (curinterp->Icddir)
-#define compcv (curinterp->Icompcv)
-#define compiling (curinterp->Icompiling)
-#define comppad (curinterp->Icomppad)
-#define comppad_name (curinterp->Icomppad_name)
-#define comppad_name_fill (curinterp->Icomppad_name_fill)
-#define comppad_name_floor (curinterp->Icomppad_name_floor)
-#define copline (curinterp->Icopline)
-#define curcopdb (curinterp->Icurcopdb)
-#define curstname (curinterp->Icurstname)
-#define dbargs (curinterp->Idbargs)
-#define debdelim (curinterp->Idebdelim)
-#define debname (curinterp->Idebname)
-#define debstash (curinterp->Idebstash)
-#define defgv (curinterp->Idefgv)
-#define diehook (curinterp->Idiehook)
-#define dlevel (curinterp->Idlevel)
-#define dlmax (curinterp->Idlmax)
-#define doextract (curinterp->Idoextract)
-#define doswitches (curinterp->Idoswitches)
-#define dowarn (curinterp->Idowarn)
-#define dumplvl (curinterp->Idumplvl)
-#define e_script (curinterp->Ie_script)
-#define endav (curinterp->Iendav)
-#define envgv (curinterp->Ienvgv)
-#define errgv (curinterp->Ierrgv)
-#define eval_root (curinterp->Ieval_root)
-#define eval_start (curinterp->Ieval_start)
-#define exitlist (curinterp->Iexitlist)
-#define exitlistlen (curinterp->Iexitlistlen)
-#define fdpid (curinterp->Ifdpid)
-#define filemode (curinterp->Ifilemode)
-#define forkprocess (curinterp->Iforkprocess)
-#define formfeed (curinterp->Iformfeed)
-#define generation (curinterp->Igeneration)
-#define gensym (curinterp->Igensym)
-#define globalstash (curinterp->Iglobalstash)
-#define hintgv (curinterp->Ihintgv)
-#define in_clean_all (curinterp->Iin_clean_all)
-#define in_clean_objs (curinterp->Iin_clean_objs)
-#define incgv (curinterp->Iincgv)
-#define initav (curinterp->Iinitav)
-#define inplace (curinterp->Iinplace)
-#define last_proto (curinterp->Ilast_proto)
-#define lastfd (curinterp->Ilastfd)
-#define lastsize (curinterp->Ilastsize)
-#define lastspbase (curinterp->Ilastspbase)
-#define laststatval (curinterp->Ilaststatval)
-#define laststype (curinterp->Ilaststype)
-#define leftgv (curinterp->Ileftgv)
-#define lineary (curinterp->Ilineary)
-#define linestart (curinterp->Ilinestart)
-#define localpatches (curinterp->Ilocalpatches)
-#define main_cv (curinterp->Imain_cv)
-#define main_root (curinterp->Imain_root)
-#define main_start (curinterp->Imain_start)
-#define maxsysfd (curinterp->Imaxsysfd)
-#define mess_sv (curinterp->Imess_sv)
-#define minus_F (curinterp->Iminus_F)
-#define minus_a (curinterp->Iminus_a)
-#define minus_c (curinterp->Iminus_c)
-#define minus_l (curinterp->Iminus_l)
-#define minus_n (curinterp->Iminus_n)
-#define minus_p (curinterp->Iminus_p)
-#define modglobal (curinterp->Imodglobal)
-#define multiline (curinterp->Imultiline)
-#define mystrk (curinterp->Imystrk)
-#define ofmt (curinterp->Iofmt)
-#define oldlastpm (curinterp->Ioldlastpm)
-#define oldname (curinterp->Ioldname)
-#define op_mask (curinterp->Iop_mask)
-#define origargc (curinterp->Iorigargc)
-#define origargv (curinterp->Iorigargv)
-#define origfilename (curinterp->Iorigfilename)
-#define ors (curinterp->Iors)
-#define orslen (curinterp->Iorslen)
-#define parsehook (curinterp->Iparsehook)
-#define patchlevel (curinterp->Ipatchlevel)
-#define pending_ident (curinterp->Ipending_ident)
-#define perl_destruct_level (curinterp->Iperl_destruct_level)
-#define perldb (curinterp->Iperldb)
-#define preambleav (curinterp->Ipreambleav)
-#define preambled (curinterp->Ipreambled)
-#define preprocess (curinterp->Ipreprocess)
-#define profiledata (curinterp->Iprofiledata)
-#define replgv (curinterp->Ireplgv)
-#define rightgv (curinterp->Irightgv)
-#define rsfp (curinterp->Irsfp)
-#define rsfp_filters (curinterp->Irsfp_filters)
-#define sawampersand (curinterp->Isawampersand)
-#define sawstudy (curinterp->Isawstudy)
-#define sawvec (curinterp->Isawvec)
-#define siggv (curinterp->Isiggv)
-#define splitstr (curinterp->Isplitstr)
-#define statusvalue (curinterp->Istatusvalue)
-#define statusvalue_vms (curinterp->Istatusvalue_vms)
-#define stdingv (curinterp->Istdingv)
-#define strchop (curinterp->Istrchop)
-#define strtab (curinterp->Istrtab)
-#define sub_generation (curinterp->Isub_generation)
-#define sublex_info (curinterp->Isublex_info)
-#define sv_arenaroot (curinterp->Isv_arenaroot)
-#define sv_count (curinterp->Isv_count)
-#define sv_objcount (curinterp->Isv_objcount)
-#define sv_root (curinterp->Isv_root)
-#define sys_intern (curinterp->Isys_intern)
-#define tainting (curinterp->Itainting)
-#define threadnum (curinterp->Ithreadnum)
-#define thrsv (curinterp->Ithrsv)
-#define unsafe (curinterp->Iunsafe)
-#define warnhook (curinterp->Iwarnhook)
+#define PL_Argv (curinterp->IArgv)
+#define PL_Cmd (curinterp->ICmd)
+#define PL_DBcv (curinterp->IDBcv)
+#define PL_DBgv (curinterp->IDBgv)
+#define PL_DBline (curinterp->IDBline)
+#define PL_DBsignal (curinterp->IDBsignal)
+#define PL_DBsingle (curinterp->IDBsingle)
+#define PL_DBsub (curinterp->IDBsub)
+#define PL_DBtrace (curinterp->IDBtrace)
+#define PL_ampergv (curinterp->Iampergv)
+#define PL_archpat_auto (curinterp->Iarchpat_auto)
+#define PL_argvgv (curinterp->Iargvgv)
+#define PL_argvoutgv (curinterp->Iargvoutgv)
+#define PL_basetime (curinterp->Ibasetime)
+#define PL_beginav (curinterp->Ibeginav)
+#define PL_cddir (curinterp->Icddir)
+#define PL_compcv (curinterp->Icompcv)
+#define PL_compiling (curinterp->Icompiling)
+#define PL_comppad (curinterp->Icomppad)
+#define PL_comppad_name (curinterp->Icomppad_name)
+#define PL_comppad_name_fill (curinterp->Icomppad_name_fill)
+#define PL_comppad_name_floor (curinterp->Icomppad_name_floor)
+#define PL_copline (curinterp->Icopline)
+#define PL_curcopdb (curinterp->Icurcopdb)
+#define PL_curstname (curinterp->Icurstname)
+#define PL_dbargs (curinterp->Idbargs)
+#define PL_debdelim (curinterp->Idebdelim)
+#define PL_debname (curinterp->Idebname)
+#define PL_debstash (curinterp->Idebstash)
+#define PL_defgv (curinterp->Idefgv)
+#define PL_diehook (curinterp->Idiehook)
+#define PL_dlevel (curinterp->Idlevel)
+#define PL_dlmax (curinterp->Idlmax)
+#define PL_doextract (curinterp->Idoextract)
+#define PL_doswitches (curinterp->Idoswitches)
+#define PL_dowarn (curinterp->Idowarn)
+#define PL_dumplvl (curinterp->Idumplvl)
+#define PL_e_script (curinterp->Ie_script)
+#define PL_endav (curinterp->Iendav)
+#define PL_envgv (curinterp->Ienvgv)
+#define PL_errgv (curinterp->Ierrgv)
+#define PL_eval_root (curinterp->Ieval_root)
+#define PL_eval_start (curinterp->Ieval_start)
+#define PL_exitlist (curinterp->Iexitlist)
+#define PL_exitlistlen (curinterp->Iexitlistlen)
+#define PL_fdpid (curinterp->Ifdpid)
+#define PL_filemode (curinterp->Ifilemode)
+#define PL_forkprocess (curinterp->Iforkprocess)
+#define PL_formfeed (curinterp->Iformfeed)
+#define PL_generation (curinterp->Igeneration)
+#define PL_gensym (curinterp->Igensym)
+#define PL_globalstash (curinterp->Iglobalstash)
+#define PL_hintgv (curinterp->Ihintgv)
+#define PL_in_clean_all (curinterp->Iin_clean_all)
+#define PL_in_clean_objs (curinterp->Iin_clean_objs)
+#define PL_incgv (curinterp->Iincgv)
+#define PL_initav (curinterp->Iinitav)
+#define PL_inplace (curinterp->Iinplace)
+#define PL_last_proto (curinterp->Ilast_proto)
+#define PL_lastfd (curinterp->Ilastfd)
+#define PL_lastsize (curinterp->Ilastsize)
+#define PL_lastspbase (curinterp->Ilastspbase)
+#define PL_laststatval (curinterp->Ilaststatval)
+#define PL_laststype (curinterp->Ilaststype)
+#define PL_leftgv (curinterp->Ileftgv)
+#define PL_lineary (curinterp->Ilineary)
+#define PL_linestart (curinterp->Ilinestart)
+#define PL_localpatches (curinterp->Ilocalpatches)
+#define PL_main_cv (curinterp->Imain_cv)
+#define PL_main_root (curinterp->Imain_root)
+#define PL_main_start (curinterp->Imain_start)
+#define PL_maxsysfd (curinterp->Imaxsysfd)
+#define PL_mess_sv (curinterp->Imess_sv)
+#define PL_minus_F (curinterp->Iminus_F)
+#define PL_minus_a (curinterp->Iminus_a)
+#define PL_minus_c (curinterp->Iminus_c)
+#define PL_minus_l (curinterp->Iminus_l)
+#define PL_minus_n (curinterp->Iminus_n)
+#define PL_minus_p (curinterp->Iminus_p)
+#define PL_modglobal (curinterp->Imodglobal)
+#define PL_multiline (curinterp->Imultiline)
+#define PL_mystrk (curinterp->Imystrk)
+#define PL_ofmt (curinterp->Iofmt)
+#define PL_oldlastpm (curinterp->Ioldlastpm)
+#define PL_oldname (curinterp->Ioldname)
+#define PL_op_mask (curinterp->Iop_mask)
+#define PL_origargc (curinterp->Iorigargc)
+#define PL_origargv (curinterp->Iorigargv)
+#define PL_origfilename (curinterp->Iorigfilename)
+#define PL_ors (curinterp->Iors)
+#define PL_orslen (curinterp->Iorslen)
+#define PL_parsehook (curinterp->Iparsehook)
+#define PL_patchlevel (curinterp->Ipatchlevel)
+#define PL_pending_ident (curinterp->Ipending_ident)
+#define PL_perl_destruct_level (curinterp->Iperl_destruct_level)
+#define PL_perldb (curinterp->Iperldb)
+#define PL_preambleav (curinterp->Ipreambleav)
+#define PL_preambled (curinterp->Ipreambled)
+#define PL_preprocess (curinterp->Ipreprocess)
+#define PL_profiledata (curinterp->Iprofiledata)
+#define PL_replgv (curinterp->Ireplgv)
+#define PL_rightgv (curinterp->Irightgv)
+#define PL_rsfp (curinterp->Irsfp)
+#define PL_rsfp_filters (curinterp->Irsfp_filters)
+#define PL_sawampersand (curinterp->Isawampersand)
+#define PL_sawstudy (curinterp->Isawstudy)
+#define PL_sawvec (curinterp->Isawvec)
+#define PL_siggv (curinterp->Isiggv)
+#define PL_splitstr (curinterp->Isplitstr)
+#define PL_statusvalue (curinterp->Istatusvalue)
+#define PL_statusvalue_vms (curinterp->Istatusvalue_vms)
+#define PL_stdingv (curinterp->Istdingv)
+#define PL_strchop (curinterp->Istrchop)
+#define PL_strtab (curinterp->Istrtab)
+#define PL_sub_generation (curinterp->Isub_generation)
+#define PL_sublex_info (curinterp->Isublex_info)
+#define PL_sv_arenaroot (curinterp->Isv_arenaroot)
+#define PL_sv_count (curinterp->Isv_count)
+#define PL_sv_objcount (curinterp->Isv_objcount)
+#define PL_sv_root (curinterp->Isv_root)
+#define PL_sys_intern (curinterp->Isys_intern)
+#define PL_tainting (curinterp->Itainting)
+#define PL_threadnum (curinterp->Ithreadnum)
+#define PL_thrsv (curinterp->Ithrsv)
+#define PL_unsafe (curinterp->Iunsafe)
+#define PL_warnhook (curinterp->Iwarnhook)
#else /* !MULTIPLICITY */
-#define IArgv Argv
-#define ICmd Cmd
-#define IDBcv DBcv
-#define IDBgv DBgv
-#define IDBline DBline
-#define IDBsignal DBsignal
-#define IDBsingle DBsingle
-#define IDBsub DBsub
-#define IDBtrace DBtrace
-#define Iampergv ampergv
-#define Iarchpat_auto archpat_auto
-#define Iargvgv argvgv
-#define Iargvoutgv argvoutgv
-#define Ibasetime basetime
-#define Ibeginav beginav
-#define Icddir cddir
-#define Icompcv compcv
-#define Icompiling compiling
-#define Icomppad comppad
-#define Icomppad_name comppad_name
-#define Icomppad_name_fill comppad_name_fill
-#define Icomppad_name_floor comppad_name_floor
-#define Icopline copline
-#define Icurcopdb curcopdb
-#define Icurstname curstname
-#define Idbargs dbargs
-#define Idebdelim debdelim
-#define Idebname debname
-#define Idebstash debstash
-#define Idefgv defgv
-#define Idiehook diehook
-#define Idlevel dlevel
-#define Idlmax dlmax
-#define Idoextract doextract
-#define Idoswitches doswitches
-#define Idowarn dowarn
-#define Idumplvl dumplvl
-#define Ie_script e_script
-#define Iendav endav
-#define Ienvgv envgv
-#define Ierrgv errgv
-#define Ieval_root eval_root
-#define Ieval_start eval_start
-#define Iexitlist exitlist
-#define Iexitlistlen exitlistlen
-#define Ifdpid fdpid
-#define Ifilemode filemode
-#define Iforkprocess forkprocess
-#define Iformfeed formfeed
-#define Igeneration generation
-#define Igensym gensym
-#define Iglobalstash globalstash
-#define Ihintgv hintgv
-#define Iin_clean_all in_clean_all
-#define Iin_clean_objs in_clean_objs
-#define Iincgv incgv
-#define Iinitav initav
-#define Iinplace inplace
-#define Ilast_proto last_proto
-#define Ilastfd lastfd
-#define Ilastsize lastsize
-#define Ilastspbase lastspbase
-#define Ilaststatval laststatval
-#define Ilaststype laststype
-#define Ileftgv leftgv
-#define Ilineary lineary
-#define Ilinestart linestart
-#define Ilocalpatches localpatches
-#define Imain_cv main_cv
-#define Imain_root main_root
-#define Imain_start main_start
-#define Imaxsysfd maxsysfd
-#define Imess_sv mess_sv
-#define Iminus_F minus_F
-#define Iminus_a minus_a
-#define Iminus_c minus_c
-#define Iminus_l minus_l
-#define Iminus_n minus_n
-#define Iminus_p minus_p
-#define Imodglobal modglobal
-#define Imultiline multiline
-#define Imystrk mystrk
-#define Iofmt ofmt
-#define Ioldlastpm oldlastpm
-#define Ioldname oldname
-#define Iop_mask op_mask
-#define Iorigargc origargc
-#define Iorigargv origargv
-#define Iorigfilename origfilename
-#define Iors ors
-#define Iorslen orslen
-#define Iparsehook parsehook
-#define Ipatchlevel patchlevel
-#define Ipending_ident pending_ident
-#define Iperl_destruct_level perl_destruct_level
-#define Iperldb perldb
-#define Ipreambleav preambleav
-#define Ipreambled preambled
-#define Ipreprocess preprocess
-#define Iprofiledata profiledata
-#define Ireplgv replgv
-#define Irightgv rightgv
-#define Irsfp rsfp
-#define Irsfp_filters rsfp_filters
-#define Isawampersand sawampersand
-#define Isawstudy sawstudy
-#define Isawvec sawvec
-#define Isiggv siggv
-#define Isplitstr splitstr
-#define Istatusvalue statusvalue
-#define Istatusvalue_vms statusvalue_vms
-#define Istdingv stdingv
-#define Istrchop strchop
-#define Istrtab strtab
-#define Isub_generation sub_generation
-#define Isublex_info sublex_info
-#define Isv_arenaroot sv_arenaroot
-#define Isv_count sv_count
-#define Isv_objcount sv_objcount
-#define Isv_root sv_root
-#define Isys_intern sys_intern
-#define Itainting tainting
-#define Ithreadnum threadnum
-#define Ithrsv thrsv
-#define Iunsafe unsafe
-#define Iwarnhook warnhook
+#define IArgv PL_Argv
+#define ICmd PL_Cmd
+#define IDBcv PL_DBcv
+#define IDBgv PL_DBgv
+#define IDBline PL_DBline
+#define IDBsignal PL_DBsignal
+#define IDBsingle PL_DBsingle
+#define IDBsub PL_DBsub
+#define IDBtrace PL_DBtrace
+#define Iampergv PL_ampergv
+#define Iarchpat_auto PL_archpat_auto
+#define Iargvgv PL_argvgv
+#define Iargvoutgv PL_argvoutgv
+#define Ibasetime PL_basetime
+#define Ibeginav PL_beginav
+#define Icddir PL_cddir
+#define Icompcv PL_compcv
+#define Icompiling PL_compiling
+#define Icomppad PL_comppad
+#define Icomppad_name PL_comppad_name
+#define Icomppad_name_fill PL_comppad_name_fill
+#define Icomppad_name_floor PL_comppad_name_floor
+#define Icopline PL_copline
+#define Icurcopdb PL_curcopdb
+#define Icurstname PL_curstname
+#define Idbargs PL_dbargs
+#define Idebdelim PL_debdelim
+#define Idebname PL_debname
+#define Idebstash PL_debstash
+#define Idefgv PL_defgv
+#define Idiehook PL_diehook
+#define Idlevel PL_dlevel
+#define Idlmax PL_dlmax
+#define Idoextract PL_doextract
+#define Idoswitches PL_doswitches
+#define Idowarn PL_dowarn
+#define Idumplvl PL_dumplvl
+#define Ie_script PL_e_script
+#define Iendav PL_endav
+#define Ienvgv PL_envgv
+#define Ierrgv PL_errgv
+#define Ieval_root PL_eval_root
+#define Ieval_start PL_eval_start
+#define Iexitlist PL_exitlist
+#define Iexitlistlen PL_exitlistlen
+#define Ifdpid PL_fdpid
+#define Ifilemode PL_filemode
+#define Iforkprocess PL_forkprocess
+#define Iformfeed PL_formfeed
+#define Igeneration PL_generation
+#define Igensym PL_gensym
+#define Iglobalstash PL_globalstash
+#define Ihintgv PL_hintgv
+#define Iin_clean_all PL_in_clean_all
+#define Iin_clean_objs PL_in_clean_objs
+#define Iincgv PL_incgv
+#define Iinitav PL_initav
+#define Iinplace PL_inplace
+#define Ilast_proto PL_last_proto
+#define Ilastfd PL_lastfd
+#define Ilastsize PL_lastsize
+#define Ilastspbase PL_lastspbase
+#define Ilaststatval PL_laststatval
+#define Ilaststype PL_laststype
+#define Ileftgv PL_leftgv
+#define Ilineary PL_lineary
+#define Ilinestart PL_linestart
+#define Ilocalpatches PL_localpatches
+#define Imain_cv PL_main_cv
+#define Imain_root PL_main_root
+#define Imain_start PL_main_start
+#define Imaxsysfd PL_maxsysfd
+#define Imess_sv PL_mess_sv
+#define Iminus_F PL_minus_F
+#define Iminus_a PL_minus_a
+#define Iminus_c PL_minus_c
+#define Iminus_l PL_minus_l
+#define Iminus_n PL_minus_n
+#define Iminus_p PL_minus_p
+#define Imodglobal PL_modglobal
+#define Imultiline PL_multiline
+#define Imystrk PL_mystrk
+#define Iofmt PL_ofmt
+#define Ioldlastpm PL_oldlastpm
+#define Ioldname PL_oldname
+#define Iop_mask PL_op_mask
+#define Iorigargc PL_origargc
+#define Iorigargv PL_origargv
+#define Iorigfilename PL_origfilename
+#define Iors PL_ors
+#define Iorslen PL_orslen
+#define Iparsehook PL_parsehook
+#define Ipatchlevel PL_patchlevel
+#define Ipending_ident PL_pending_ident
+#define Iperl_destruct_level PL_perl_destruct_level
+#define Iperldb PL_perldb
+#define Ipreambleav PL_preambleav
+#define Ipreambled PL_preambled
+#define Ipreprocess PL_preprocess
+#define Iprofiledata PL_profiledata
+#define Ireplgv PL_replgv
+#define Irightgv PL_rightgv
+#define Irsfp PL_rsfp
+#define Irsfp_filters PL_rsfp_filters
+#define Isawampersand PL_sawampersand
+#define Isawstudy PL_sawstudy
+#define Isawvec PL_sawvec
+#define Isiggv PL_siggv
+#define Isplitstr PL_splitstr
+#define Istatusvalue PL_statusvalue
+#define Istatusvalue_vms PL_statusvalue_vms
+#define Istdingv PL_stdingv
+#define Istrchop PL_strchop
+#define Istrtab PL_strtab
+#define Isub_generation PL_sub_generation
+#define Isublex_info PL_sublex_info
+#define Isv_arenaroot PL_sv_arenaroot
+#define Isv_count PL_sv_count
+#define Isv_objcount PL_sv_objcount
+#define Isv_root PL_sv_root
+#define Isys_intern PL_sys_intern
+#define Itainting PL_tainting
+#define Ithreadnum PL_threadnum
+#define Ithrsv PL_thrsv
+#define Iunsafe PL_unsafe
+#define Iwarnhook PL_warnhook
#ifndef USE_THREADS
-#define TSv Sv
-#define TXpv Xpv
-#define Tav_fetch_sv av_fetch_sv
-#define Tbodytarget bodytarget
-#define Tbostr bostr
-#define Tchopset chopset
-#define Tcolors colors
-#define Tcolorset colorset
-#define Tcurcop curcop
-#define Tcurpad curpad
-#define Tcurpm curpm
-#define Tcurstack curstack
-#define Tcurstackinfo curstackinfo
-#define Tcurstash curstash
-#define Tdefoutgv defoutgv
-#define Tdefstash defstash
-#define Tdelaymagic delaymagic
-#define Tdirty dirty
-#define Textralen extralen
-#define Tfirstgv firstgv
-#define Tformtarget formtarget
-#define Thv_fetch_ent_mh hv_fetch_ent_mh
-#define Thv_fetch_sv hv_fetch_sv
-#define Tin_eval in_eval
-#define Tlast_in_gv last_in_gv
-#define Tlastgotoprobe lastgotoprobe
-#define Tlastscream lastscream
-#define Tlocalizing localizing
-#define Tmainstack mainstack
-#define Tmarkstack markstack
-#define Tmarkstack_max markstack_max
-#define Tmarkstack_ptr markstack_ptr
-#define Tmaxscream maxscream
-#define Tmodcount modcount
-#define Tnrs nrs
-#define Tofs ofs
-#define Tofslen ofslen
-#define Top op
-#define Topsave opsave
-#define Treg_eval_set reg_eval_set
-#define Treg_flags reg_flags
-#define Treg_start_tmp reg_start_tmp
-#define Treg_start_tmpl reg_start_tmpl
-#define Tregbol regbol
-#define Tregcc regcc
-#define Tregcode regcode
-#define Tregcomp_parse regcomp_parse
-#define Tregcomp_rx regcomp_rx
-#define Tregcompp regcompp
-#define Tregdata regdata
-#define Tregdummy regdummy
-#define Tregendp regendp
-#define Tregeol regeol
-#define Tregexecp regexecp
-#define Tregflags regflags
-#define Tregindent regindent
-#define Treginput reginput
-#define Treginterp_cnt reginterp_cnt
-#define Treglastparen reglastparen
-#define Tregnarrate regnarrate
-#define Tregnaughty regnaughty
-#define Tregnpar regnpar
-#define Tregprecomp regprecomp
-#define Tregprev regprev
-#define Tregprogram regprogram
-#define Tregsawback regsawback
-#define Tregseen regseen
-#define Tregsize regsize
-#define Tregstartp regstartp
-#define Tregtill regtill
-#define Tregxend regxend
-#define Trestartop restartop
-#define Tretstack retstack
-#define Tretstack_ix retstack_ix
-#define Tretstack_max retstack_max
-#define Trs rs
-#define Tsavestack savestack
-#define Tsavestack_ix savestack_ix
-#define Tsavestack_max savestack_max
-#define Tscopestack scopestack
-#define Tscopestack_ix scopestack_ix
-#define Tscopestack_max scopestack_max
-#define Tscreamfirst screamfirst
-#define Tscreamnext screamnext
-#define Tsecondgv secondgv
-#define Tseen_evals seen_evals
-#define Tseen_zerolen seen_zerolen
-#define Tsortcop sortcop
-#define Tsortcxix sortcxix
-#define Tsortstash sortstash
-#define Tstack_base stack_base
-#define Tstack_max stack_max
-#define Tstack_sp stack_sp
-#define Tstart_env start_env
-#define Tstatbuf statbuf
-#define Tstatcache statcache
-#define Tstatgv statgv
-#define Tstatname statname
-#define Ttainted tainted
-#define Ttimesbuf timesbuf
-#define Ttmps_floor tmps_floor
-#define Ttmps_ix tmps_ix
-#define Ttmps_max tmps_max
-#define Ttmps_stack tmps_stack
-#define Ttop_env top_env
-#define Ttoptarget toptarget
+#define TSv PL_Sv
+#define TXpv PL_Xpv
+#define Tav_fetch_sv PL_av_fetch_sv
+#define Tbodytarget PL_bodytarget
+#define Tbostr PL_bostr
+#define Tchopset PL_chopset
+#define Tcolors PL_colors
+#define Tcolorset PL_colorset
+#define Tcurcop PL_curcop
+#define Tcurpad PL_curpad
+#define Tcurpm PL_curpm
+#define Tcurstack PL_curstack
+#define Tcurstackinfo PL_curstackinfo
+#define Tcurstash PL_curstash
+#define Tdefoutgv PL_defoutgv
+#define Tdefstash PL_defstash
+#define Tdelaymagic PL_delaymagic
+#define Tdirty PL_dirty
+#define Textralen PL_extralen
+#define Tfirstgv PL_firstgv
+#define Tformtarget PL_formtarget
+#define Thv_fetch_ent_mh PL_hv_fetch_ent_mh
+#define Thv_fetch_sv PL_hv_fetch_sv
+#define Tin_eval PL_in_eval
+#define Tlast_in_gv PL_last_in_gv
+#define Tlastgotoprobe PL_lastgotoprobe
+#define Tlastscream PL_lastscream
+#define Tlocalizing PL_localizing
+#define Tmainstack PL_mainstack
+#define Tmarkstack PL_markstack
+#define Tmarkstack_max PL_markstack_max
+#define Tmarkstack_ptr PL_markstack_ptr
+#define Tmaxscream PL_maxscream
+#define Tmodcount PL_modcount
+#define Tnrs PL_nrs
+#define Tofs PL_ofs
+#define Tofslen PL_ofslen
+#define Top PL_op
+#define Topsave PL_opsave
+#define Treg_eval_set PL_reg_eval_set
+#define Treg_flags PL_reg_flags
+#define Treg_start_tmp PL_reg_start_tmp
+#define Treg_start_tmpl PL_reg_start_tmpl
+#define Tregbol PL_regbol
+#define Tregcc PL_regcc
+#define Tregcode PL_regcode
+#define Tregcomp_parse PL_regcomp_parse
+#define Tregcomp_rx PL_regcomp_rx
+#define Tregcompp PL_regcompp
+#define Tregdata PL_regdata
+#define Tregdummy PL_regdummy
+#define Tregendp PL_regendp
+#define Tregeol PL_regeol
+#define Tregexecp PL_regexecp
+#define Tregflags PL_regflags
+#define Tregindent PL_regindent
+#define Treginput PL_reginput
+#define Treginterp_cnt PL_reginterp_cnt
+#define Treglastparen PL_reglastparen
+#define Tregnarrate PL_regnarrate
+#define Tregnaughty PL_regnaughty
+#define Tregnpar PL_regnpar
+#define Tregprecomp PL_regprecomp
+#define Tregprev PL_regprev
+#define Tregprogram PL_regprogram
+#define Tregsawback PL_regsawback
+#define Tregseen PL_regseen
+#define Tregsize PL_regsize
+#define Tregstartp PL_regstartp
+#define Tregtill PL_regtill
+#define Tregxend PL_regxend
+#define Trestartop PL_restartop
+#define Tretstack PL_retstack
+#define Tretstack_ix PL_retstack_ix
+#define Tretstack_max PL_retstack_max
+#define Trs PL_rs
+#define Tsavestack PL_savestack
+#define Tsavestack_ix PL_savestack_ix
+#define Tsavestack_max PL_savestack_max
+#define Tscopestack PL_scopestack
+#define Tscopestack_ix PL_scopestack_ix
+#define Tscopestack_max PL_scopestack_max
+#define Tscreamfirst PL_screamfirst
+#define Tscreamnext PL_screamnext
+#define Tsecondgv PL_secondgv
+#define Tseen_evals PL_seen_evals
+#define Tseen_zerolen PL_seen_zerolen
+#define Tsortcop PL_sortcop
+#define Tsortcxix PL_sortcxix
+#define Tsortstash PL_sortstash
+#define Tstack_base PL_stack_base
+#define Tstack_max PL_stack_max
+#define Tstack_sp PL_stack_sp
+#define Tstart_env PL_start_env
+#define Tstatbuf PL_statbuf
+#define Tstatcache PL_statcache
+#define Tstatgv PL_statgv
+#define Tstatname PL_statname
+#define Ttainted PL_tainted
+#define Ttimesbuf PL_timesbuf
+#define Ttmps_floor PL_tmps_floor
+#define Ttmps_ix PL_tmps_ix
+#define Ttmps_max PL_tmps_max
+#define Ttmps_stack PL_tmps_stack
+#define Ttop_env PL_top_env
+#define Ttoptarget PL_toptarget
#endif /* USE_THREADS */
#ifdef EMBED
-#define Argv Perl_Argv
-#define Cmd Perl_Cmd
-#define DBcv Perl_DBcv
-#define DBgv Perl_DBgv
-#define DBline Perl_DBline
-#define DBsignal Perl_DBsignal
-#define DBsingle Perl_DBsingle
-#define DBsub Perl_DBsub
-#define DBtrace Perl_DBtrace
-#define ampergv Perl_ampergv
-#define archpat_auto Perl_archpat_auto
-#define argvgv Perl_argvgv
-#define argvoutgv Perl_argvoutgv
-#define basetime Perl_basetime
-#define beginav Perl_beginav
-#define cddir Perl_cddir
-#define compcv Perl_compcv
-#define compiling Perl_compiling
-#define comppad Perl_comppad
-#define comppad_name Perl_comppad_name
-#define comppad_name_fill Perl_comppad_name_fill
-#define comppad_name_floor Perl_comppad_name_floor
-#define copline Perl_copline
-#define curcopdb Perl_curcopdb
-#define curstname Perl_curstname
-#define dbargs Perl_dbargs
-#define debdelim Perl_debdelim
-#define debname Perl_debname
-#define debstash Perl_debstash
-#define defgv Perl_defgv
-#define diehook Perl_diehook
-#define dlevel Perl_dlevel
-#define dlmax Perl_dlmax
-#define doextract Perl_doextract
-#define doswitches Perl_doswitches
-#define dowarn Perl_dowarn
-#define dumplvl Perl_dumplvl
-#define e_script Perl_e_script
-#define endav Perl_endav
-#define envgv Perl_envgv
-#define errgv Perl_errgv
-#define eval_root Perl_eval_root
-#define eval_start Perl_eval_start
-#define exitlist Perl_exitlist
-#define exitlistlen Perl_exitlistlen
-#define fdpid Perl_fdpid
-#define filemode Perl_filemode
-#define forkprocess Perl_forkprocess
-#define formfeed Perl_formfeed
-#define generation Perl_generation
-#define gensym Perl_gensym
-#define globalstash Perl_globalstash
-#define hintgv Perl_hintgv
-#define in_clean_all Perl_in_clean_all
-#define in_clean_objs Perl_in_clean_objs
-#define incgv Perl_incgv
-#define initav Perl_initav
-#define inplace Perl_inplace
-#define last_proto Perl_last_proto
-#define lastfd Perl_lastfd
-#define lastsize Perl_lastsize
-#define lastspbase Perl_lastspbase
-#define laststatval Perl_laststatval
-#define laststype Perl_laststype
-#define leftgv Perl_leftgv
-#define lineary Perl_lineary
-#define linestart Perl_linestart
-#define localpatches Perl_localpatches
-#define main_cv Perl_main_cv
-#define main_root Perl_main_root
-#define main_start Perl_main_start
-#define maxsysfd Perl_maxsysfd
-#define mess_sv Perl_mess_sv
-#define minus_F Perl_minus_F
-#define minus_a Perl_minus_a
-#define minus_c Perl_minus_c
-#define minus_l Perl_minus_l
-#define minus_n Perl_minus_n
-#define minus_p Perl_minus_p
-#define modglobal Perl_modglobal
-#define multiline Perl_multiline
-#define mystrk Perl_mystrk
-#define ofmt Perl_ofmt
-#define oldlastpm Perl_oldlastpm
-#define oldname Perl_oldname
-#define op_mask Perl_op_mask
-#define origargc Perl_origargc
-#define origargv Perl_origargv
-#define origfilename Perl_origfilename
-#define ors Perl_ors
-#define orslen Perl_orslen
-#define parsehook Perl_parsehook
-#define patchlevel Perl_patchlevel
-#define pending_ident Perl_pending_ident
-#define perl_destruct_level Perl_perl_destruct_level
-#define perldb Perl_perldb
-#define preambleav Perl_preambleav
-#define preambled Perl_preambled
-#define preprocess Perl_preprocess
-#define profiledata Perl_profiledata
-#define replgv Perl_replgv
-#define rightgv Perl_rightgv
-#define rsfp Perl_rsfp
-#define rsfp_filters Perl_rsfp_filters
-#define sawampersand Perl_sawampersand
-#define sawstudy Perl_sawstudy
-#define sawvec Perl_sawvec
-#define siggv Perl_siggv
-#define splitstr Perl_splitstr
-#define statusvalue Perl_statusvalue
-#define statusvalue_vms Perl_statusvalue_vms
-#define stdingv Perl_stdingv
-#define strchop Perl_strchop
-#define strtab Perl_strtab
-#define sub_generation Perl_sub_generation
-#define sublex_info Perl_sublex_info
-#define sv_arenaroot Perl_sv_arenaroot
-#define sv_count Perl_sv_count
-#define sv_objcount Perl_sv_objcount
-#define sv_root Perl_sv_root
-#define sys_intern Perl_sys_intern
-#define tainting Perl_tainting
-#define threadnum Perl_threadnum
-#define thrsv Perl_thrsv
-#define unsafe Perl_unsafe
-#define warnhook Perl_warnhook
#ifndef USE_THREADS
-#define Sv Perl_Sv
-#define Xpv Perl_Xpv
-#define av_fetch_sv Perl_av_fetch_sv
-#define bodytarget Perl_bodytarget
-#define bostr Perl_bostr
-#define chopset Perl_chopset
-#define colors Perl_colors
-#define colorset Perl_colorset
-#define curcop Perl_curcop
-#define curpad Perl_curpad
-#define curpm Perl_curpm
-#define curstack Perl_curstack
-#define curstackinfo Perl_curstackinfo
-#define curstash Perl_curstash
-#define defoutgv Perl_defoutgv
-#define defstash Perl_defstash
-#define delaymagic Perl_delaymagic
-#define dirty Perl_dirty
-#define extralen Perl_extralen
-#define firstgv Perl_firstgv
-#define formtarget Perl_formtarget
-#define hv_fetch_ent_mh Perl_hv_fetch_ent_mh
-#define hv_fetch_sv Perl_hv_fetch_sv
-#define in_eval Perl_in_eval
-#define last_in_gv Perl_last_in_gv
-#define lastgotoprobe Perl_lastgotoprobe
-#define lastscream Perl_lastscream
-#define localizing Perl_localizing
-#define mainstack Perl_mainstack
-#define markstack Perl_markstack
-#define markstack_max Perl_markstack_max
-#define markstack_ptr Perl_markstack_ptr
-#define maxscream Perl_maxscream
-#define modcount Perl_modcount
-#define nrs Perl_nrs
-#define ofs Perl_ofs
-#define ofslen Perl_ofslen
-#define op Perl_op
-#define opsave Perl_opsave
-#define reg_eval_set Perl_reg_eval_set
-#define reg_flags Perl_reg_flags
-#define reg_start_tmp Perl_reg_start_tmp
-#define reg_start_tmpl Perl_reg_start_tmpl
-#define regbol Perl_regbol
-#define regcc Perl_regcc
-#define regcode Perl_regcode
-#define regcomp_parse Perl_regcomp_parse
-#define regcomp_rx Perl_regcomp_rx
-#define regcompp Perl_regcompp
-#define regdata Perl_regdata
-#define regdummy Perl_regdummy
-#define regendp Perl_regendp
-#define regeol Perl_regeol
-#define regexecp Perl_regexecp
-#define regflags Perl_regflags
-#define regindent Perl_regindent
-#define reginput Perl_reginput
-#define reginterp_cnt Perl_reginterp_cnt
-#define reglastparen Perl_reglastparen
-#define regnarrate Perl_regnarrate
-#define regnaughty Perl_regnaughty
-#define regnpar Perl_regnpar
-#define regprecomp Perl_regprecomp
-#define regprev Perl_regprev
-#define regprogram Perl_regprogram
-#define regsawback Perl_regsawback
-#define regseen Perl_regseen
-#define regsize Perl_regsize
-#define regstartp Perl_regstartp
-#define regtill Perl_regtill
-#define regxend Perl_regxend
-#define restartop Perl_restartop
-#define retstack Perl_retstack
-#define retstack_ix Perl_retstack_ix
-#define retstack_max Perl_retstack_max
-#define rs Perl_rs
-#define savestack Perl_savestack
-#define savestack_ix Perl_savestack_ix
-#define savestack_max Perl_savestack_max
-#define scopestack Perl_scopestack
-#define scopestack_ix Perl_scopestack_ix
-#define scopestack_max Perl_scopestack_max
-#define screamfirst Perl_screamfirst
-#define screamnext Perl_screamnext
-#define secondgv Perl_secondgv
-#define seen_evals Perl_seen_evals
-#define seen_zerolen Perl_seen_zerolen
-#define sortcop Perl_sortcop
-#define sortcxix Perl_sortcxix
-#define sortstash Perl_sortstash
-#define stack_base Perl_stack_base
-#define stack_max Perl_stack_max
-#define stack_sp Perl_stack_sp
-#define start_env Perl_start_env
-#define statbuf Perl_statbuf
-#define statcache Perl_statcache
-#define statgv Perl_statgv
-#define statname Perl_statname
-#define tainted Perl_tainted
-#define timesbuf Perl_timesbuf
-#define tmps_floor Perl_tmps_floor
-#define tmps_ix Perl_tmps_ix
-#define tmps_max Perl_tmps_max
-#define tmps_stack Perl_tmps_stack
-#define top_env Perl_top_env
-#define toptarget Perl_toptarget
#endif /* USE_THREADS */
#endif /* EMBED */
#ifdef USE_THREADS
-#define Sv (thr->TSv)
-#define Xpv (thr->TXpv)
-#define av_fetch_sv (thr->Tav_fetch_sv)
-#define bodytarget (thr->Tbodytarget)
-#define bostr (thr->Tbostr)
-#define chopset (thr->Tchopset)
-#define colors (thr->Tcolors)
-#define colorset (thr->Tcolorset)
-#define curcop (thr->Tcurcop)
-#define curpad (thr->Tcurpad)
-#define curpm (thr->Tcurpm)
-#define curstack (thr->Tcurstack)
-#define curstackinfo (thr->Tcurstackinfo)
-#define curstash (thr->Tcurstash)
-#define defoutgv (thr->Tdefoutgv)
-#define defstash (thr->Tdefstash)
-#define delaymagic (thr->Tdelaymagic)
-#define dirty (thr->Tdirty)
-#define extralen (thr->Textralen)
-#define firstgv (thr->Tfirstgv)
-#define formtarget (thr->Tformtarget)
-#define hv_fetch_ent_mh (thr->Thv_fetch_ent_mh)
-#define hv_fetch_sv (thr->Thv_fetch_sv)
-#define in_eval (thr->Tin_eval)
-#define last_in_gv (thr->Tlast_in_gv)
-#define lastgotoprobe (thr->Tlastgotoprobe)
-#define lastscream (thr->Tlastscream)
-#define localizing (thr->Tlocalizing)
-#define mainstack (thr->Tmainstack)
-#define markstack (thr->Tmarkstack)
-#define markstack_max (thr->Tmarkstack_max)
-#define markstack_ptr (thr->Tmarkstack_ptr)
-#define maxscream (thr->Tmaxscream)
-#define modcount (thr->Tmodcount)
-#define nrs (thr->Tnrs)
-#define ofs (thr->Tofs)
-#define ofslen (thr->Tofslen)
-#define op (thr->Top)
-#define opsave (thr->Topsave)
-#define reg_eval_set (thr->Treg_eval_set)
-#define reg_flags (thr->Treg_flags)
-#define reg_start_tmp (thr->Treg_start_tmp)
-#define reg_start_tmpl (thr->Treg_start_tmpl)
-#define regbol (thr->Tregbol)
-#define regcc (thr->Tregcc)
-#define regcode (thr->Tregcode)
-#define regcomp_parse (thr->Tregcomp_parse)
-#define regcomp_rx (thr->Tregcomp_rx)
-#define regcompp (thr->Tregcompp)
-#define regdata (thr->Tregdata)
-#define regdummy (thr->Tregdummy)
-#define regendp (thr->Tregendp)
-#define regeol (thr->Tregeol)
-#define regexecp (thr->Tregexecp)
-#define regflags (thr->Tregflags)
-#define regindent (thr->Tregindent)
-#define reginput (thr->Treginput)
-#define reginterp_cnt (thr->Treginterp_cnt)
-#define reglastparen (thr->Treglastparen)
-#define regnarrate (thr->Tregnarrate)
-#define regnaughty (thr->Tregnaughty)
-#define regnpar (thr->Tregnpar)
-#define regprecomp (thr->Tregprecomp)
-#define regprev (thr->Tregprev)
-#define regprogram (thr->Tregprogram)
-#define regsawback (thr->Tregsawback)
-#define regseen (thr->Tregseen)
-#define regsize (thr->Tregsize)
-#define regstartp (thr->Tregstartp)
-#define regtill (thr->Tregtill)
-#define regxend (thr->Tregxend)
-#define restartop (thr->Trestartop)
-#define retstack (thr->Tretstack)
-#define retstack_ix (thr->Tretstack_ix)
-#define retstack_max (thr->Tretstack_max)
-#define rs (thr->Trs)
-#define savestack (thr->Tsavestack)
-#define savestack_ix (thr->Tsavestack_ix)
-#define savestack_max (thr->Tsavestack_max)
-#define scopestack (thr->Tscopestack)
-#define scopestack_ix (thr->Tscopestack_ix)
-#define scopestack_max (thr->Tscopestack_max)
-#define screamfirst (thr->Tscreamfirst)
-#define screamnext (thr->Tscreamnext)
-#define secondgv (thr->Tsecondgv)
-#define seen_evals (thr->Tseen_evals)
-#define seen_zerolen (thr->Tseen_zerolen)
-#define sortcop (thr->Tsortcop)
-#define sortcxix (thr->Tsortcxix)
-#define sortstash (thr->Tsortstash)
-#define stack_base (thr->Tstack_base)
-#define stack_max (thr->Tstack_max)
-#define stack_sp (thr->Tstack_sp)
-#define start_env (thr->Tstart_env)
-#define statbuf (thr->Tstatbuf)
-#define statcache (thr->Tstatcache)
-#define statgv (thr->Tstatgv)
-#define statname (thr->Tstatname)
-#define tainted (thr->Ttainted)
-#define timesbuf (thr->Ttimesbuf)
-#define tmps_floor (thr->Ttmps_floor)
-#define tmps_ix (thr->Ttmps_ix)
-#define tmps_max (thr->Ttmps_max)
-#define tmps_stack (thr->Ttmps_stack)
-#define top_env (thr->Ttop_env)
-#define toptarget (thr->Ttoptarget)
+#define PL_Sv (thr->TSv)
+#define PL_Xpv (thr->TXpv)
+#define PL_av_fetch_sv (thr->Tav_fetch_sv)
+#define PL_bodytarget (thr->Tbodytarget)
+#define PL_bostr (thr->Tbostr)
+#define PL_chopset (thr->Tchopset)
+#define PL_colors (thr->Tcolors)
+#define PL_colorset (thr->Tcolorset)
+#define PL_curcop (thr->Tcurcop)
+#define PL_curpad (thr->Tcurpad)
+#define PL_curpm (thr->Tcurpm)
+#define PL_curstack (thr->Tcurstack)
+#define PL_curstackinfo (thr->Tcurstackinfo)
+#define PL_curstash (thr->Tcurstash)
+#define PL_defoutgv (thr->Tdefoutgv)
+#define PL_defstash (thr->Tdefstash)
+#define PL_delaymagic (thr->Tdelaymagic)
+#define PL_dirty (thr->Tdirty)
+#define PL_extralen (thr->Textralen)
+#define PL_firstgv (thr->Tfirstgv)
+#define PL_formtarget (thr->Tformtarget)
+#define PL_hv_fetch_ent_mh (thr->Thv_fetch_ent_mh)
+#define PL_hv_fetch_sv (thr->Thv_fetch_sv)
+#define PL_in_eval (thr->Tin_eval)
+#define PL_last_in_gv (thr->Tlast_in_gv)
+#define PL_lastgotoprobe (thr->Tlastgotoprobe)
+#define PL_lastscream (thr->Tlastscream)
+#define PL_localizing (thr->Tlocalizing)
+#define PL_mainstack (thr->Tmainstack)
+#define PL_markstack (thr->Tmarkstack)
+#define PL_markstack_max (thr->Tmarkstack_max)
+#define PL_markstack_ptr (thr->Tmarkstack_ptr)
+#define PL_maxscream (thr->Tmaxscream)
+#define PL_modcount (thr->Tmodcount)
+#define PL_nrs (thr->Tnrs)
+#define PL_ofs (thr->Tofs)
+#define PL_ofslen (thr->Tofslen)
+#define PL_op (thr->Top)
+#define PL_opsave (thr->Topsave)
+#define PL_reg_eval_set (thr->Treg_eval_set)
+#define PL_reg_flags (thr->Treg_flags)
+#define PL_reg_start_tmp (thr->Treg_start_tmp)
+#define PL_reg_start_tmpl (thr->Treg_start_tmpl)
+#define PL_regbol (thr->Tregbol)
+#define PL_regcc (thr->Tregcc)
+#define PL_regcode (thr->Tregcode)
+#define PL_regcomp_parse (thr->Tregcomp_parse)
+#define PL_regcomp_rx (thr->Tregcomp_rx)
+#define PL_regcompp (thr->Tregcompp)
+#define PL_regdata (thr->Tregdata)
+#define PL_regdummy (thr->Tregdummy)
+#define PL_regendp (thr->Tregendp)
+#define PL_regeol (thr->Tregeol)
+#define PL_regexecp (thr->Tregexecp)
+#define PL_regflags (thr->Tregflags)
+#define PL_regindent (thr->Tregindent)
+#define PL_reginput (thr->Treginput)
+#define PL_reginterp_cnt (thr->Treginterp_cnt)
+#define PL_reglastparen (thr->Treglastparen)
+#define PL_regnarrate (thr->Tregnarrate)
+#define PL_regnaughty (thr->Tregnaughty)
+#define PL_regnpar (thr->Tregnpar)
+#define PL_regprecomp (thr->Tregprecomp)
+#define PL_regprev (thr->Tregprev)
+#define PL_regprogram (thr->Tregprogram)
+#define PL_regsawback (thr->Tregsawback)
+#define PL_regseen (thr->Tregseen)
+#define PL_regsize (thr->Tregsize)
+#define PL_regstartp (thr->Tregstartp)
+#define PL_regtill (thr->Tregtill)
+#define PL_regxend (thr->Tregxend)
+#define PL_restartop (thr->Trestartop)
+#define PL_retstack (thr->Tretstack)
+#define PL_retstack_ix (thr->Tretstack_ix)
+#define PL_retstack_max (thr->Tretstack_max)
+#define PL_rs (thr->Trs)
+#define PL_savestack (thr->Tsavestack)
+#define PL_savestack_ix (thr->Tsavestack_ix)
+#define PL_savestack_max (thr->Tsavestack_max)
+#define PL_scopestack (thr->Tscopestack)
+#define PL_scopestack_ix (thr->Tscopestack_ix)
+#define PL_scopestack_max (thr->Tscopestack_max)
+#define PL_screamfirst (thr->Tscreamfirst)
+#define PL_screamnext (thr->Tscreamnext)
+#define PL_secondgv (thr->Tsecondgv)
+#define PL_seen_evals (thr->Tseen_evals)
+#define PL_seen_zerolen (thr->Tseen_zerolen)
+#define PL_sortcop (thr->Tsortcop)
+#define PL_sortcxix (thr->Tsortcxix)
+#define PL_sortstash (thr->Tsortstash)
+#define PL_stack_base (thr->Tstack_base)
+#define PL_stack_max (thr->Tstack_max)
+#define PL_stack_sp (thr->Tstack_sp)
+#define PL_start_env (thr->Tstart_env)
+#define PL_statbuf (thr->Tstatbuf)
+#define PL_statcache (thr->Tstatcache)
+#define PL_statgv (thr->Tstatgv)
+#define PL_statname (thr->Tstatname)
+#define PL_tainted (thr->Ttainted)
+#define PL_timesbuf (thr->Ttimesbuf)
+#define PL_tmps_floor (thr->Ttmps_floor)
+#define PL_tmps_ix (thr->Ttmps_ix)
+#define PL_tmps_max (thr->Ttmps_max)
+#define PL_tmps_stack (thr->Ttmps_stack)
+#define PL_top_env (thr->Ttop_env)
+#define PL_toptarget (thr->Ttoptarget)
#endif /* USE_THREADS */
#ifdef PERL_GLOBAL_STRUCT
-#define No (Perl_Vars.GNo)
-#define Yes (Perl_Vars.GYes)
-#define amagic_generation (Perl_Vars.Gamagic_generation)
-#define an (Perl_Vars.Gan)
-#define bufend (Perl_Vars.Gbufend)
-#define bufptr (Perl_Vars.Gbufptr)
-#define collation_ix (Perl_Vars.Gcollation_ix)
-#define collation_name (Perl_Vars.Gcollation_name)
-#define collation_standard (Perl_Vars.Gcollation_standard)
-#define collxfrm_base (Perl_Vars.Gcollxfrm_base)
-#define collxfrm_mult (Perl_Vars.Gcollxfrm_mult)
-#define cop_seqmax (Perl_Vars.Gcop_seqmax)
-#define cryptseen (Perl_Vars.Gcryptseen)
-#define cshlen (Perl_Vars.Gcshlen)
-#define cshname (Perl_Vars.Gcshname)
-#define curinterp (Perl_Vars.Gcurinterp)
-#define curthr (Perl_Vars.Gcurthr)
-#define debug (Perl_Vars.Gdebug)
-#define do_undump (Perl_Vars.Gdo_undump)
-#define egid (Perl_Vars.Gegid)
-#define error_count (Perl_Vars.Gerror_count)
-#define euid (Perl_Vars.Geuid)
-#define eval_cond (Perl_Vars.Geval_cond)
-#define eval_mutex (Perl_Vars.Geval_mutex)
-#define eval_owner (Perl_Vars.Geval_owner)
-#define evalseq (Perl_Vars.Gevalseq)
-#define expect (Perl_Vars.Gexpect)
-#define gid (Perl_Vars.Ggid)
-#define he_root (Perl_Vars.Ghe_root)
-#define hexdigit (Perl_Vars.Ghexdigit)
-#define hints (Perl_Vars.Ghints)
-#define in_my (Perl_Vars.Gin_my)
-#define in_my_stash (Perl_Vars.Gin_my_stash)
-#define last_lop (Perl_Vars.Glast_lop)
-#define last_lop_op (Perl_Vars.Glast_lop_op)
-#define last_uni (Perl_Vars.Glast_uni)
-#define lex_brackets (Perl_Vars.Glex_brackets)
-#define lex_brackstack (Perl_Vars.Glex_brackstack)
-#define lex_casemods (Perl_Vars.Glex_casemods)
-#define lex_casestack (Perl_Vars.Glex_casestack)
-#define lex_defer (Perl_Vars.Glex_defer)
-#define lex_dojoin (Perl_Vars.Glex_dojoin)
-#define lex_expect (Perl_Vars.Glex_expect)
-#define lex_fakebrack (Perl_Vars.Glex_fakebrack)
-#define lex_formbrack (Perl_Vars.Glex_formbrack)
-#define lex_inpat (Perl_Vars.Glex_inpat)
-#define lex_inwhat (Perl_Vars.Glex_inwhat)
-#define lex_op (Perl_Vars.Glex_op)
-#define lex_repl (Perl_Vars.Glex_repl)
-#define lex_starts (Perl_Vars.Glex_starts)
-#define lex_state (Perl_Vars.Glex_state)
-#define lex_stuff (Perl_Vars.Glex_stuff)
-#define linestr (Perl_Vars.Glinestr)
-#define malloc_mutex (Perl_Vars.Gmalloc_mutex)
-#define max_intro_pending (Perl_Vars.Gmax_intro_pending)
-#define maxo (Perl_Vars.Gmaxo)
-#define min_intro_pending (Perl_Vars.Gmin_intro_pending)
-#define multi_close (Perl_Vars.Gmulti_close)
-#define multi_end (Perl_Vars.Gmulti_end)
-#define multi_open (Perl_Vars.Gmulti_open)
-#define multi_start (Perl_Vars.Gmulti_start)
-#define na (Perl_Vars.Gna)
-#define nexttoke (Perl_Vars.Gnexttoke)
-#define nexttype (Perl_Vars.Gnexttype)
-#define nextval (Perl_Vars.Gnextval)
-#define nice_chunk (Perl_Vars.Gnice_chunk)
-#define nice_chunk_size (Perl_Vars.Gnice_chunk_size)
-#define ninterps (Perl_Vars.Gninterps)
-#define nomemok (Perl_Vars.Gnomemok)
-#define nthreads (Perl_Vars.Gnthreads)
-#define nthreads_cond (Perl_Vars.Gnthreads_cond)
-#define numeric_local (Perl_Vars.Gnumeric_local)
-#define numeric_name (Perl_Vars.Gnumeric_name)
-#define numeric_standard (Perl_Vars.Gnumeric_standard)
-#define oldbufptr (Perl_Vars.Goldbufptr)
-#define oldoldbufptr (Perl_Vars.Goldoldbufptr)
-#define op_seqmax (Perl_Vars.Gop_seqmax)
-#define origalen (Perl_Vars.Gorigalen)
-#define origenviron (Perl_Vars.Gorigenviron)
-#define osname (Perl_Vars.Gosname)
-#define pad_reset_pending (Perl_Vars.Gpad_reset_pending)
-#define padix (Perl_Vars.Gpadix)
-#define padix_floor (Perl_Vars.Gpadix_floor)
-#define patleave (Perl_Vars.Gpatleave)
-#define pidstatus (Perl_Vars.Gpidstatus)
-#define runops (Perl_Vars.Grunops)
-#define sh_path (Perl_Vars.Gsh_path)
-#define sighandlerp (Perl_Vars.Gsighandlerp)
-#define specialsv_list (Perl_Vars.Gspecialsv_list)
-#define subline (Perl_Vars.Gsubline)
-#define subname (Perl_Vars.Gsubname)
-#define sv_mutex (Perl_Vars.Gsv_mutex)
-#define sv_no (Perl_Vars.Gsv_no)
-#define sv_undef (Perl_Vars.Gsv_undef)
-#define sv_yes (Perl_Vars.Gsv_yes)
-#define svref_mutex (Perl_Vars.Gsvref_mutex)
-#define thisexpr (Perl_Vars.Gthisexpr)
-#define thr_key (Perl_Vars.Gthr_key)
-#define threads_mutex (Perl_Vars.Gthreads_mutex)
-#define threadsv_names (Perl_Vars.Gthreadsv_names)
-#define tokenbuf (Perl_Vars.Gtokenbuf)
-#define uid (Perl_Vars.Guid)
-#define xiv_arenaroot (Perl_Vars.Gxiv_arenaroot)
-#define xiv_root (Perl_Vars.Gxiv_root)
-#define xnv_root (Perl_Vars.Gxnv_root)
-#define xpv_root (Perl_Vars.Gxpv_root)
-#define xrv_root (Perl_Vars.Gxrv_root)
+#define PL_No (Perl_Vars.GNo)
+#define PL_Yes (Perl_Vars.GYes)
+#define PL_amagic_generation (Perl_Vars.Gamagic_generation)
+#define PL_an (Perl_Vars.Gan)
+#define PL_bufend (Perl_Vars.Gbufend)
+#define PL_bufptr (Perl_Vars.Gbufptr)
+#define PL_collation_ix (Perl_Vars.Gcollation_ix)
+#define PL_collation_name (Perl_Vars.Gcollation_name)
+#define PL_collation_standard (Perl_Vars.Gcollation_standard)
+#define PL_collxfrm_base (Perl_Vars.Gcollxfrm_base)
+#define PL_collxfrm_mult (Perl_Vars.Gcollxfrm_mult)
+#define PL_cop_seqmax (Perl_Vars.Gcop_seqmax)
+#define PL_cryptseen (Perl_Vars.Gcryptseen)
+#define PL_cshlen (Perl_Vars.Gcshlen)
+#define PL_cshname (Perl_Vars.Gcshname)
+#define PL_curinterp (Perl_Vars.Gcurinterp)
+#define PL_curthr (Perl_Vars.Gcurthr)
+#define PL_debug (Perl_Vars.Gdebug)
+#define PL_do_undump (Perl_Vars.Gdo_undump)
+#define PL_egid (Perl_Vars.Gegid)
+#define PL_error_count (Perl_Vars.Gerror_count)
+#define PL_euid (Perl_Vars.Geuid)
+#define PL_eval_cond (Perl_Vars.Geval_cond)
+#define PL_eval_mutex (Perl_Vars.Geval_mutex)
+#define PL_eval_owner (Perl_Vars.Geval_owner)
+#define PL_evalseq (Perl_Vars.Gevalseq)
+#define PL_expect (Perl_Vars.Gexpect)
+#define PL_gid (Perl_Vars.Ggid)
+#define PL_he_root (Perl_Vars.Ghe_root)
+#define PL_hexdigit (Perl_Vars.Ghexdigit)
+#define PL_hints (Perl_Vars.Ghints)
+#define PL_in_my (Perl_Vars.Gin_my)
+#define PL_in_my_stash (Perl_Vars.Gin_my_stash)
+#define PL_last_lop (Perl_Vars.Glast_lop)
+#define PL_last_lop_op (Perl_Vars.Glast_lop_op)
+#define PL_last_uni (Perl_Vars.Glast_uni)
+#define PL_lex_brackets (Perl_Vars.Glex_brackets)
+#define PL_lex_brackstack (Perl_Vars.Glex_brackstack)
+#define PL_lex_casemods (Perl_Vars.Glex_casemods)
+#define PL_lex_casestack (Perl_Vars.Glex_casestack)
+#define PL_lex_defer (Perl_Vars.Glex_defer)
+#define PL_lex_dojoin (Perl_Vars.Glex_dojoin)
+#define PL_lex_expect (Perl_Vars.Glex_expect)
+#define PL_lex_fakebrack (Perl_Vars.Glex_fakebrack)
+#define PL_lex_formbrack (Perl_Vars.Glex_formbrack)
+#define PL_lex_inpat (Perl_Vars.Glex_inpat)
+#define PL_lex_inwhat (Perl_Vars.Glex_inwhat)
+#define PL_lex_op (Perl_Vars.Glex_op)
+#define PL_lex_repl (Perl_Vars.Glex_repl)
+#define PL_lex_starts (Perl_Vars.Glex_starts)
+#define PL_lex_state (Perl_Vars.Glex_state)
+#define PL_lex_stuff (Perl_Vars.Glex_stuff)
+#define PL_linestr (Perl_Vars.Glinestr)
+#define PL_malloc_mutex (Perl_Vars.Gmalloc_mutex)
+#define PL_max_intro_pending (Perl_Vars.Gmax_intro_pending)
+#define PL_maxo (Perl_Vars.Gmaxo)
+#define PL_min_intro_pending (Perl_Vars.Gmin_intro_pending)
+#define PL_multi_close (Perl_Vars.Gmulti_close)
+#define PL_multi_end (Perl_Vars.Gmulti_end)
+#define PL_multi_open (Perl_Vars.Gmulti_open)
+#define PL_multi_start (Perl_Vars.Gmulti_start)
+#define PL_na (Perl_Vars.Gna)
+#define PL_nexttoke (Perl_Vars.Gnexttoke)
+#define PL_nexttype (Perl_Vars.Gnexttype)
+#define PL_nextval (Perl_Vars.Gnextval)
+#define PL_nice_chunk (Perl_Vars.Gnice_chunk)
+#define PL_nice_chunk_size (Perl_Vars.Gnice_chunk_size)
+#define PL_ninterps (Perl_Vars.Gninterps)
+#define PL_nomemok (Perl_Vars.Gnomemok)
+#define PL_nthreads (Perl_Vars.Gnthreads)
+#define PL_nthreads_cond (Perl_Vars.Gnthreads_cond)
+#define PL_numeric_local (Perl_Vars.Gnumeric_local)
+#define PL_numeric_name (Perl_Vars.Gnumeric_name)
+#define PL_numeric_standard (Perl_Vars.Gnumeric_standard)
+#define PL_oldbufptr (Perl_Vars.Goldbufptr)
+#define PL_oldoldbufptr (Perl_Vars.Goldoldbufptr)
+#define PL_op_seqmax (Perl_Vars.Gop_seqmax)
+#define PL_origalen (Perl_Vars.Gorigalen)
+#define PL_origenviron (Perl_Vars.Gorigenviron)
+#define PL_osname (Perl_Vars.Gosname)
+#define PL_pad_reset_pending (Perl_Vars.Gpad_reset_pending)
+#define PL_padix (Perl_Vars.Gpadix)
+#define PL_padix_floor (Perl_Vars.Gpadix_floor)
+#define PL_patleave (Perl_Vars.Gpatleave)
+#define PL_pidstatus (Perl_Vars.Gpidstatus)
+#define PL_runops (Perl_Vars.Grunops)
+#define PL_sh_path (Perl_Vars.Gsh_path)
+#define PL_sighandlerp (Perl_Vars.Gsighandlerp)
+#define PL_specialsv_list (Perl_Vars.Gspecialsv_list)
+#define PL_subline (Perl_Vars.Gsubline)
+#define PL_subname (Perl_Vars.Gsubname)
+#define PL_sv_mutex (Perl_Vars.Gsv_mutex)
+#define PL_sv_no (Perl_Vars.Gsv_no)
+#define PL_sv_undef (Perl_Vars.Gsv_undef)
+#define PL_sv_yes (Perl_Vars.Gsv_yes)
+#define PL_svref_mutex (Perl_Vars.Gsvref_mutex)
+#define PL_thisexpr (Perl_Vars.Gthisexpr)
+#define PL_thr_key (Perl_Vars.Gthr_key)
+#define PL_threads_mutex (Perl_Vars.Gthreads_mutex)
+#define PL_threadsv_names (Perl_Vars.Gthreadsv_names)
+#define PL_tokenbuf (Perl_Vars.Gtokenbuf)
+#define PL_uid (Perl_Vars.Guid)
+#define PL_xiv_arenaroot (Perl_Vars.Gxiv_arenaroot)
+#define PL_xiv_root (Perl_Vars.Gxiv_root)
+#define PL_xnv_root (Perl_Vars.Gxnv_root)
+#define PL_xpv_root (Perl_Vars.Gxpv_root)
+#define PL_xrv_root (Perl_Vars.Gxrv_root)
#else /* !PERL_GLOBAL_STRUCT */
-#define GNo No
-#define GYes Yes
-#define Gamagic_generation amagic_generation
-#define Gan an
-#define Gbufend bufend
-#define Gbufptr bufptr
-#define Gcollation_ix collation_ix
-#define Gcollation_name collation_name
-#define Gcollation_standard collation_standard
-#define Gcollxfrm_base collxfrm_base
-#define Gcollxfrm_mult collxfrm_mult
-#define Gcop_seqmax cop_seqmax
-#define Gcryptseen cryptseen
-#define Gcshlen cshlen
-#define Gcshname cshname
-#define Gcurinterp curinterp
-#define Gcurthr curthr
-#define Gdebug debug
-#define Gdo_undump do_undump
-#define Gegid egid
-#define Gerror_count error_count
-#define Geuid euid
-#define Geval_cond eval_cond
-#define Geval_mutex eval_mutex
-#define Geval_owner eval_owner
-#define Gevalseq evalseq
-#define Gexpect expect
-#define Ggid gid
-#define Ghe_root he_root
-#define Ghexdigit hexdigit
-#define Ghints hints
-#define Gin_my in_my
-#define Gin_my_stash in_my_stash
-#define Glast_lop last_lop
-#define Glast_lop_op last_lop_op
-#define Glast_uni last_uni
-#define Glex_brackets lex_brackets
-#define Glex_brackstack lex_brackstack
-#define Glex_casemods lex_casemods
-#define Glex_casestack lex_casestack
-#define Glex_defer lex_defer
-#define Glex_dojoin lex_dojoin
-#define Glex_expect lex_expect
-#define Glex_fakebrack lex_fakebrack
-#define Glex_formbrack lex_formbrack
-#define Glex_inpat lex_inpat
-#define Glex_inwhat lex_inwhat
-#define Glex_op lex_op
-#define Glex_repl lex_repl
-#define Glex_starts lex_starts
-#define Glex_state lex_state
-#define Glex_stuff lex_stuff
-#define Glinestr linestr
-#define Gmalloc_mutex malloc_mutex
-#define Gmax_intro_pending max_intro_pending
-#define Gmaxo maxo
-#define Gmin_intro_pending min_intro_pending
-#define Gmulti_close multi_close
-#define Gmulti_end multi_end
-#define Gmulti_open multi_open
-#define Gmulti_start multi_start
-#define Gna na
-#define Gnexttoke nexttoke
-#define Gnexttype nexttype
-#define Gnextval nextval
-#define Gnice_chunk nice_chunk
-#define Gnice_chunk_size nice_chunk_size
-#define Gninterps ninterps
-#define Gnomemok nomemok
-#define Gnthreads nthreads
-#define Gnthreads_cond nthreads_cond
-#define Gnumeric_local numeric_local
-#define Gnumeric_name numeric_name
-#define Gnumeric_standard numeric_standard
-#define Goldbufptr oldbufptr
-#define Goldoldbufptr oldoldbufptr
-#define Gop_seqmax op_seqmax
-#define Gorigalen origalen
-#define Gorigenviron origenviron
-#define Gosname osname
-#define Gpad_reset_pending pad_reset_pending
-#define Gpadix padix
-#define Gpadix_floor padix_floor
-#define Gpatleave patleave
-#define Gpidstatus pidstatus
-#define Grunops runops
-#define Gsh_path sh_path
-#define Gsighandlerp sighandlerp
-#define Gspecialsv_list specialsv_list
-#define Gsubline subline
-#define Gsubname subname
-#define Gsv_mutex sv_mutex
-#define Gsv_no sv_no
-#define Gsv_undef sv_undef
-#define Gsv_yes sv_yes
-#define Gsvref_mutex svref_mutex
-#define Gthisexpr thisexpr
-#define Gthr_key thr_key
-#define Gthreads_mutex threads_mutex
-#define Gthreadsv_names threadsv_names
-#define Gtokenbuf tokenbuf
-#define Guid uid
-#define Gxiv_arenaroot xiv_arenaroot
-#define Gxiv_root xiv_root
-#define Gxnv_root xnv_root
-#define Gxpv_root xpv_root
-#define Gxrv_root xrv_root
+#define GNo PL_No
+#define GYes PL_Yes
+#define Gamagic_generation PL_amagic_generation
+#define Gan PL_an
+#define Gbufend PL_bufend
+#define Gbufptr PL_bufptr
+#define Gcollation_ix PL_collation_ix
+#define Gcollation_name PL_collation_name
+#define Gcollation_standard PL_collation_standard
+#define Gcollxfrm_base PL_collxfrm_base
+#define Gcollxfrm_mult PL_collxfrm_mult
+#define Gcop_seqmax PL_cop_seqmax
+#define Gcryptseen PL_cryptseen
+#define Gcshlen PL_cshlen
+#define Gcshname PL_cshname
+#define Gcurinterp PL_curinterp
+#define Gcurthr PL_curthr
+#define Gdebug PL_debug
+#define Gdo_undump PL_do_undump
+#define Gegid PL_egid
+#define Gerror_count PL_error_count
+#define Geuid PL_euid
+#define Geval_cond PL_eval_cond
+#define Geval_mutex PL_eval_mutex
+#define Geval_owner PL_eval_owner
+#define Gevalseq PL_evalseq
+#define Gexpect PL_expect
+#define Ggid PL_gid
+#define Ghe_root PL_he_root
+#define Ghexdigit PL_hexdigit
+#define Ghints PL_hints
+#define Gin_my PL_in_my
+#define Gin_my_stash PL_in_my_stash
+#define Glast_lop PL_last_lop
+#define Glast_lop_op PL_last_lop_op
+#define Glast_uni PL_last_uni
+#define Glex_brackets PL_lex_brackets
+#define Glex_brackstack PL_lex_brackstack
+#define Glex_casemods PL_lex_casemods
+#define Glex_casestack PL_lex_casestack
+#define Glex_defer PL_lex_defer
+#define Glex_dojoin PL_lex_dojoin
+#define Glex_expect PL_lex_expect
+#define Glex_fakebrack PL_lex_fakebrack
+#define Glex_formbrack PL_lex_formbrack
+#define Glex_inpat PL_lex_inpat
+#define Glex_inwhat PL_lex_inwhat
+#define Glex_op PL_lex_op
+#define Glex_repl PL_lex_repl
+#define Glex_starts PL_lex_starts
+#define Glex_state PL_lex_state
+#define Glex_stuff PL_lex_stuff
+#define Glinestr PL_linestr
+#define Gmalloc_mutex PL_malloc_mutex
+#define Gmax_intro_pending PL_max_intro_pending
+#define Gmaxo PL_maxo
+#define Gmin_intro_pending PL_min_intro_pending
+#define Gmulti_close PL_multi_close
+#define Gmulti_end PL_multi_end
+#define Gmulti_open PL_multi_open
+#define Gmulti_start PL_multi_start
+#define Gna PL_na
+#define Gnexttoke PL_nexttoke
+#define Gnexttype PL_nexttype
+#define Gnextval PL_nextval
+#define Gnice_chunk PL_nice_chunk
+#define Gnice_chunk_size PL_nice_chunk_size
+#define Gninterps PL_ninterps
+#define Gnomemok PL_nomemok
+#define Gnthreads PL_nthreads
+#define Gnthreads_cond PL_nthreads_cond
+#define Gnumeric_local PL_numeric_local
+#define Gnumeric_name PL_numeric_name
+#define Gnumeric_standard PL_numeric_standard
+#define Goldbufptr PL_oldbufptr
+#define Goldoldbufptr PL_oldoldbufptr
+#define Gop_seqmax PL_op_seqmax
+#define Gorigalen PL_origalen
+#define Gorigenviron PL_origenviron
+#define Gosname PL_osname
+#define Gpad_reset_pending PL_pad_reset_pending
+#define Gpadix PL_padix
+#define Gpadix_floor PL_padix_floor
+#define Gpatleave PL_patleave
+#define Gpidstatus PL_pidstatus
+#define Grunops PL_runops
+#define Gsh_path PL_sh_path
+#define Gsighandlerp PL_sighandlerp
+#define Gspecialsv_list PL_specialsv_list
+#define Gsubline PL_subline
+#define Gsubname PL_subname
+#define Gsv_mutex PL_sv_mutex
+#define Gsv_no PL_sv_no
+#define Gsv_undef PL_sv_undef
+#define Gsv_yes PL_sv_yes
+#define Gsvref_mutex PL_svref_mutex
+#define Gthisexpr PL_thisexpr
+#define Gthr_key PL_thr_key
+#define Gthreads_mutex PL_threads_mutex
+#define Gthreadsv_names PL_threadsv_names
+#define Gtokenbuf PL_tokenbuf
+#define Guid PL_uid
+#define Gxiv_arenaroot PL_xiv_arenaroot
+#define Gxiv_root PL_xiv_root
+#define Gxnv_root PL_xnv_root
+#define Gxpv_root PL_xpv_root
+#define Gxrv_root PL_xrv_root
#ifdef EMBED
-#define No Perl_No
-#define Yes Perl_Yes
-#define amagic_generation Perl_amagic_generation
-#define an Perl_an
-#define bufend Perl_bufend
-#define bufptr Perl_bufptr
-#define collation_ix Perl_collation_ix
-#define collation_name Perl_collation_name
-#define collation_standard Perl_collation_standard
-#define collxfrm_base Perl_collxfrm_base
-#define collxfrm_mult Perl_collxfrm_mult
-#define cop_seqmax Perl_cop_seqmax
-#define cryptseen Perl_cryptseen
-#define cshlen Perl_cshlen
-#define cshname Perl_cshname
-#define curinterp Perl_curinterp
-#define curthr Perl_curthr
-#define debug Perl_debug
-#define do_undump Perl_do_undump
-#define egid Perl_egid
-#define error_count Perl_error_count
-#define euid Perl_euid
-#define eval_cond Perl_eval_cond
-#define eval_mutex Perl_eval_mutex
-#define eval_owner Perl_eval_owner
-#define evalseq Perl_evalseq
-#define expect Perl_expect
-#define gid Perl_gid
-#define he_root Perl_he_root
-#define hexdigit Perl_hexdigit
-#define hints Perl_hints
-#define in_my Perl_in_my
-#define in_my_stash Perl_in_my_stash
-#define last_lop Perl_last_lop
-#define last_lop_op Perl_last_lop_op
-#define last_uni Perl_last_uni
-#define lex_brackets Perl_lex_brackets
-#define lex_brackstack Perl_lex_brackstack
-#define lex_casemods Perl_lex_casemods
-#define lex_casestack Perl_lex_casestack
-#define lex_defer Perl_lex_defer
-#define lex_dojoin Perl_lex_dojoin
-#define lex_expect Perl_lex_expect
-#define lex_fakebrack Perl_lex_fakebrack
-#define lex_formbrack Perl_lex_formbrack
-#define lex_inpat Perl_lex_inpat
-#define lex_inwhat Perl_lex_inwhat
-#define lex_op Perl_lex_op
-#define lex_repl Perl_lex_repl
-#define lex_starts Perl_lex_starts
-#define lex_state Perl_lex_state
-#define lex_stuff Perl_lex_stuff
-#define linestr Perl_linestr
-#define malloc_mutex Perl_malloc_mutex
-#define max_intro_pending Perl_max_intro_pending
-#define maxo Perl_maxo
-#define min_intro_pending Perl_min_intro_pending
-#define multi_close Perl_multi_close
-#define multi_end Perl_multi_end
-#define multi_open Perl_multi_open
-#define multi_start Perl_multi_start
-#define na Perl_na
-#define nexttoke Perl_nexttoke
-#define nexttype Perl_nexttype
-#define nextval Perl_nextval
-#define nice_chunk Perl_nice_chunk
-#define nice_chunk_size Perl_nice_chunk_size
-#define ninterps Perl_ninterps
-#define nomemok Perl_nomemok
-#define nthreads Perl_nthreads
-#define nthreads_cond Perl_nthreads_cond
-#define numeric_local Perl_numeric_local
-#define numeric_name Perl_numeric_name
-#define numeric_standard Perl_numeric_standard
-#define oldbufptr Perl_oldbufptr
-#define oldoldbufptr Perl_oldoldbufptr
-#define op_seqmax Perl_op_seqmax
-#define origalen Perl_origalen
-#define origenviron Perl_origenviron
-#define osname Perl_osname
-#define pad_reset_pending Perl_pad_reset_pending
-#define padix Perl_padix
-#define padix_floor Perl_padix_floor
-#define patleave Perl_patleave
-#define pidstatus Perl_pidstatus
-#define runops Perl_runops
-#define sh_path Perl_sh_path
-#define sighandlerp Perl_sighandlerp
-#define specialsv_list Perl_specialsv_list
-#define subline Perl_subline
-#define subname Perl_subname
-#define sv_mutex Perl_sv_mutex
-#define sv_no Perl_sv_no
-#define sv_undef Perl_sv_undef
-#define sv_yes Perl_sv_yes
-#define svref_mutex Perl_svref_mutex
-#define thisexpr Perl_thisexpr
-#define thr_key Perl_thr_key
-#define threads_mutex Perl_threads_mutex
-#define threadsv_names Perl_threadsv_names
-#define tokenbuf Perl_tokenbuf
-#define uid Perl_uid
-#define xiv_arenaroot Perl_xiv_arenaroot
-#define xiv_root Perl_xiv_root
-#define xnv_root Perl_xnv_root
-#define xpv_root Perl_xpv_root
-#define xrv_root Perl_xrv_root
#endif /* EMBED */
#endif /* PERL_GLOBAL_STRUCT */
char *type = 0;
IV iv;
- for (iv = 0; iv < sizeof(specialsv_list)/sizeof(SV*); iv++) {
- if (sv == specialsv_list[iv]) {
+ for (iv = 0; iv < sizeof(PL_specialsv_list)/sizeof(SV*); iv++) {
+ if (sv == PL_specialsv_list[iv]) {
type = "B::SPECIAL";
break;
}
BOOT:
INIT_SPECIALSV_LIST;
-#define B_main_cv() main_cv
-#define B_main_root() main_root
-#define B_main_start() main_start
-#define B_comppadlist() (main_cv ? CvPADLIST(main_cv) : CvPADLIST(compcv))
-#define B_sv_undef() &sv_undef
-#define B_sv_yes() &sv_yes
-#define B_sv_no() &sv_no
+#define B_main_cv() PL_main_cv
+#define B_main_root() PL_main_root
+#define B_main_start() PL_main_start
+#define B_comppadlist() (PL_main_cv ? CvPADLIST(PL_main_cv) : CvPADLIST(PL_compcv))
+#define B_sv_undef() &PL_sv_undef
+#define B_sv_yes() &PL_sv_yes
+#define B_sv_no() &PL_sv_no
B::CV
B_main_cv()
int opnum
CODE:
ST(0) = sv_newmortal();
- if (opnum >= 0 && opnum < maxo) {
+ if (opnum >= 0 && opnum < PL_maxo) {
sv_setpvn(ST(0), "pp_", 3);
sv_catpv(ST(0), op_name[opnum]);
}
void
minus_c()
CODE:
- minus_c = TRUE;
+ PL_minus_c = TRUE;
SV *
cstring(sv)
if (SvGMAGICAL(val))
mg_get(val);
- if (val == &sv_undef || !SvOK(val)) {
+ if (val == &PL_sv_undef || !SvOK(val)) {
sv_catpvn(retval, "undef", 5);
return 1;
}
XPUSHs(val); PUTBACK;
i = perl_call_method(SvPVX(freezer), G_EVAL|G_SCALAR);
SPAGAIN;
- if (SvTRUE(GvSV(errgv)))
+ if (SvTRUE(GvSV(PL_errgv)))
warn("WARNING(Freezer method call failed): %s",
- SvPVX(GvSV(errgv)));
+ SvPVX(GvSV(PL_errgv)));
else if (i)
val = newSVsv(POPs);
PUTBACK; FREETMPS; LEAVE;
if (svp)
elem = *svp;
else
- elem = &sv_undef;
+ elem = &PL_sv_undef;
ilen = inamelen;
sv_setiv(ixsv, ix);
todumpav = namesav = Nullav;
seenhv = Nullhv;
val = pad = xpad = apad = sep = tmp = varname
- = freezer = toaster = bless = &sv_undef;
+ = freezer = toaster = bless = &PL_sv_undef;
name = sv_newmortal();
indent = 2;
terse = useqq = purity = deepcopy = 0;
if ((svp = av_fetch(todumpav, i, FALSE)))
val = *svp;
else
- val = &sv_undef;
+ val = &PL_sv_undef;
if ((svp = av_fetch(namesav, i, TRUE)))
sv_setsv(name, *svp);
else
if (rld_success) {
result = path;
/* prevent multiple loads of same file into same process */
- hv_store(dl_loaded_files, path, strlen(path), &sv_yes, 0);
+ hv_store(dl_loaded_files, path, strlen(path), &PL_sv_yes, 0);
} else {
TransferError(nxerr);
result = (char*) 0;
New(0, tmpbuf, strlen(filename) + 5, char);
SAVEFREEPV(tmpbuf);
sprintf(tmpbuf,"%s.dir",filename);
- if (stat(tmpbuf, &statbuf) < 0) {
+ if (stat(tmpbuf, &PL_statbuf) < 0) {
if (flags & O_CREAT) {
if (mode < 0 || close(creat(tmpbuf,mode)) < 0)
croak("ODBM_File: Can't create %s", filename);
#include "perl.h"
#include "XSUB.h"
-/* maxo shouldn't differ from MAXO but leave room anyway (see BOOT:) */
+/* PL_maxo shouldn't differ from MAXO but leave room anyway (see BOOT:) */
#define OP_MASK_BUF_SIZE (MAXO + 100)
/* XXX op_named_bits and opset_all are never freed */
op_named_bits = newHV();
op_names = get_op_names();
- for(i=0; i < maxo; ++i) {
+ for(i=0; i < PL_maxo; ++i) {
SV *sv;
sv = newSViv(i);
SvREADONLY_on(sv);
while(i-- > 0)
bitmap[i] = 0xFF;
/* Take care to set the right number of bits in the last byte */
- bitmap[len-1] = (maxo & 0x07) ? ~(0xFF << (maxo & 0x07)) : 0xFF;
+ bitmap[len-1] = (PL_maxo & 0x07) ? ~(0xFF << (PL_maxo & 0x07)) : 0xFF;
put_op_bitspec(":all",0, opset_all); /* don't mortalise */
}
int myopcode = SvIV(bitspec);
int offset = myopcode >> 3;
int bit = myopcode & 0x07;
- if (myopcode >= maxo || myopcode < 0)
+ if (myopcode >= PL_maxo || myopcode < 0)
croak("panic: opcode \"%s\" value %d is invalid", opname, myopcode);
if (opcode_debug >= 2)
warn("set_opset_bits bit %2d (off=%d, bit=%d) %s %s\n",
static void
-opmask_add(SV *opset) /* THE ONLY FUNCTION TO EDIT op_mask ITSELF */
+opmask_add(SV *opset) /* THE ONLY FUNCTION TO EDIT PL_op_mask ITSELF */
{
int i,j;
char *bitmask;
verify_opset(opset,1); /* croaks on bad opset */
- if (!op_mask) /* caller must ensure op_mask exists */
- croak("Can't add to uninitialised op_mask");
+ if (!PL_op_mask) /* caller must ensure PL_op_mask exists */
+ croak("Can't add to uninitialised PL_op_mask");
/* OPCODES ALREADY MASKED ARE NEVER UNMASKED. See opmask_addlocal() */
myopcode += 8;
continue;
}
- for (j=0; j < 8 && myopcode < maxo; )
- op_mask[myopcode++] |= bits & (1 << j++);
+ for (j=0; j < 8 && myopcode < PL_maxo; )
+ PL_op_mask[myopcode++] |= bits & (1 << j++);
}
}
static void
-opmask_addlocal(SV *opset, char *op_mask_buf) /* Localise op_mask then opmask_add() */
+opmask_addlocal(SV *opset, char *op_mask_buf) /* Localise PL_op_mask then opmask_add() */
{
- char *orig_op_mask = op_mask;
- SAVEPPTR(op_mask);
+ char *orig_op_mask = PL_op_mask;
+ SAVEPPTR(PL_op_mask);
#if !(defined(PERL_OBJECT) && defined(__BORLANDC__))
/* XXX casting to an ordinary function ptr from a member function ptr
* is disallowed by Borland
*/
if (opcode_debug >= 2)
- SAVEDESTRUCTOR((void(CPERLscope(*))_((void*)))warn,"op_mask restored");
+ SAVEDESTRUCTOR((void(CPERLscope(*))_((void*)))warn,"PL_op_mask restored");
#endif
- op_mask = &op_mask_buf[0];
+ PL_op_mask = &op_mask_buf[0];
if (orig_op_mask)
- Copy(orig_op_mask, op_mask, maxo, char);
+ Copy(orig_op_mask, PL_op_mask, PL_maxo, char);
else
- Zero(op_mask, maxo, char);
+ Zero(PL_op_mask, PL_maxo, char);
opmask_add(opset);
}
PROTOTYPES: ENABLE
BOOT:
- assert(maxo < OP_MASK_BUF_SIZE);
- opset_len = (maxo + 7) / 8;
+ assert(PL_maxo < OP_MASK_BUF_SIZE);
+ opset_len = (PL_maxo + 7) / 8;
if (opcode_debug >= 1)
warn("opset_len %ld\n", (long)opset_len);
op_names_init();
opmask_addlocal(mask, op_mask_buf);
- save_aptr(&endav);
- endav = (AV*)sv_2mortal((SV*)newAV()); /* ignore END blocks for now */
+ save_aptr(&PL_endav);
+ PL_endav = (AV*)sv_2mortal((SV*)newAV()); /* ignore END blocks for now */
- save_hptr(&defstash); /* save current default stack */
+ save_hptr(&PL_defstash); /* save current default stack */
/* the assignment to global defstash changes our sense of 'main' */
- defstash = gv_stashpv(Package, GV_ADDWARN); /* should exist already */
+ PL_defstash = gv_stashpv(Package, GV_ADDWARN); /* should exist already */
/* defstash must itself contain a main:: so we'll add that now */
/* take care with the ref counts (was cause of long standing bug) */
/* XXX I'm still not sure if this is right, GV_ADDWARN should warn! */
gv = gv_fetchpv("main::", GV_ADDWARN, SVt_PVHV);
sv_free((SV*)GvHV(gv));
- GvHV(gv) = (HV*)SvREFCNT_inc(defstash);
+ GvHV(gv) = (HV*)SvREFCNT_inc(PL_defstash);
PUSHMARK(SP);
perl_call_sv(codesv, GIMME|G_EVAL|G_KEEPERR); /* use callers context */
bitmap = SvPVX(opset);
while(len-- > 0)
bitmap[len] = ~bitmap[len];
- /* take care of extra bits beyond maxo in last byte */
- if (maxo & 07)
- bitmap[opset_len-1] &= ~(0xFF << (maxo & 0x07));
+ /* take care of extra bits beyond PL_maxo in last byte */
+ if (PL_maxo & 07)
+ bitmap[opset_len-1] &= ~(0xFF << (PL_maxo & 0x07));
}
ST(0) = opset;
verify_opset(opset,1);
for (myopcode=0, i=0; i < opset_len; i++) {
U16 bits = bitmap[i];
- for (j=0; j < 8 && myopcode < maxo; j++, myopcode++) {
+ for (j=0; j < 8 && myopcode < PL_maxo; j++, myopcode++) {
if ( bits & (1 << j) )
XPUSHs(sv_2mortal(newSVpv(names[myopcode], 0)));
}
SV *bitspec = get_op_bitspec(opname, len, 1);
if (SvIOK(bitspec)) {
myopcode = SvIV(bitspec);
- if (myopcode < 0 || myopcode >= maxo)
+ if (myopcode < 0 || myopcode >= PL_maxo)
croak("panic: opcode %d (%s) out of range",myopcode,opname);
XPUSHs(sv_2mortal(newSVpv(op_desc[myopcode], 0)));
}
myopcode = 0;
for (b=0; b < opset_len; b++) {
U16 bits = bitmap[b];
- for (j=0; j < 8 && myopcode < maxo; j++, myopcode++)
+ for (j=0; j < 8 && myopcode < PL_maxo; j++, myopcode++)
if (bits & (1 << j))
XPUSHs(sv_2mortal(newSVpv(op_desc[myopcode], 0)));
}
opmask_add(opset)
SV *opset
PREINIT:
- if (!op_mask)
- Newz(0, op_mask, maxo, char);
+ if (!PL_op_mask)
+ Newz(0, PL_op_mask, PL_maxo, char);
void
opcodes()
croak("opcodes in list context not yet implemented"); /* XXX */
}
else {
- XPUSHs(sv_2mortal(newSViv(maxo)));
+ XPUSHs(sv_2mortal(newSViv(PL_maxo)));
}
void
opmask()
CODE:
ST(0) = sv_2mortal(new_opset(Nullsv));
- if (op_mask) {
+ if (PL_op_mask) {
char *bitmap = SvPVX(ST(0));
int myopcode;
- for(myopcode=0; myopcode < maxo; ++myopcode) {
- if (op_mask[myopcode])
+ for(myopcode=0; myopcode < PL_maxo; ++myopcode) {
+ if (PL_op_mask[myopcode])
bitmap[myopcode >> 3] |= 1 << (myopcode & 0x07);
}
}
# This code is really grody because we're trying to make the signal
# interface look beautiful, which is hard.
- if (!siggv)
+ if (!PL_siggv)
gv_fetchpv("SIG", TRUE, SVt_PVHV);
{
struct sigaction oact;
POSIX__SigSet sigset;
SV** svp;
- SV** sigsvp = hv_fetch(GvHVn(siggv),
+ SV** sigsvp = hv_fetch(GvHVn(PL_siggv),
sig_name[sig],
strlen(sig_name[sig]),
TRUE);
cp++;
continue;
}
- if (base == 16 && (s=strchr(hexdigit,c))) {
+ if (base == 16 && (s=strchr(PL_hexdigit,c))) {
val = (val << 4) +
- ((s - hexdigit) & 15);
+ ((s - PL_hexdigit) & 15);
cp++;
continue;
}
int i;
CV *cv;
PPCODE:
- if (!compcv || !(cv = CvOUTSIDE(compcv)))
+ if (!PL_compcv || !(cv = CvOUTSIDE(PL_compcv)))
croak("can't set attributes outside a subroutine scope");
for (i = 1; i < items; i++) {
char *attr = SvPV(ST(i), na);
deinstall(void)
{
dTHR;
- regexecp = ®exec_flags;
- regcompp = &pregcomp;
+ PL_regexecp = ®exec_flags;
+ PL_regcompp = &pregcomp;
if (!oldfl)
- debug &= ~R_DB;
+ PL_debug &= ~R_DB;
}
static void
install(void)
{
dTHR;
- regexecp = &my_regexec;
- regcompp = &my_regcomp;
- oldfl = debug & R_DB;
- debug |= R_DB;
+ PL_regexecp = &my_regexec;
+ PL_regcompp = &my_regcomp;
+ oldfl = PL_debug & R_DB;
+ PL_debug |= R_DB;
}
MODULE = re PACKAGE = re
tmpbuf[0] = '_';
tmpbuf[1] = '<';
strcpy(tmpbuf + 2, name);
- gv = *(GV**)hv_fetch(defstash, tmpbuf, tmplen, TRUE);
+ gv = *(GV**)hv_fetch(PL_defstash, tmpbuf, tmplen, TRUE);
if (!isGV(gv))
- gv_init(gv, defstash, tmpbuf, tmplen, FALSE);
+ gv_init(gv, PL_defstash, tmpbuf, tmplen, FALSE);
if (tmpbuf != smallbuf)
Safefree(tmpbuf);
sv_setpv(GvSV(gv), name);
Newz(602, gp, 1, GP);
GvGP(gv) = gp_ref(gp);
GvSV(gv) = NEWSV(72,0);
- GvLINE(gv) = curcop->cop_line;
- GvFILEGV(gv) = curcop->cop_filegv;
+ GvLINE(gv) = PL_curcop->cop_line;
+ GvFILEGV(gv) = PL_curcop->cop_filegv;
GvCVGEN(gv) = 0;
GvEGV(gv) = gv;
sv_magic((SV*)gv, (SV*)gv, '*', name, len);
SvIOK_off(gv);
ENTER;
start_subparse(0,0); /* Create CV in compcv. */
- GvCV(gv) = compcv;
+ GvCV(gv) = PL_compcv;
LEAVE;
- sub_generation++;
+ PL_sub_generation++;
CvGV(GvCV(gv)) = (GV*)SvREFCNT_inc(gv);
- CvFILEGV(GvCV(gv)) = curcop->cop_filegv;
- CvSTASH(GvCV(gv)) = curstash;
+ CvFILEGV(GvCV(gv)) = PL_curcop->cop_filegv;
+ CvSTASH(GvCV(gv)) = PL_curstash;
#ifdef USE_THREADS
CvOWNER(GvCV(gv)) = 0;
if (!CvMUTEXP(GvCV(gv)))
gv_init(topgv, stash, name, len, TRUE);
if (cv = GvCV(topgv)) {
/* If genuine method or valid cache entry, use it */
- if (!GvCVGEN(topgv) || GvCVGEN(topgv) == sub_generation)
+ if (!GvCVGEN(topgv) || GvCVGEN(topgv) == PL_sub_generation)
return topgv;
/* Stale cached entry: junk it */
SvREFCNT_dec(cv);
GvCV(topgv) = cv = Nullcv;
GvCVGEN(topgv) = 0;
}
- else if (GvCVGEN(topgv) == sub_generation)
+ else if (GvCVGEN(topgv) == PL_sub_generation)
return 0; /* cache indicates sub doesn't exist */
}
gvp = (GV**)hv_fetch(stash, "ISA", 3, FALSE);
- av = (gvp && (gv = *gvp) && gv != (GV*)&sv_undef) ? GvAV(gv) : Nullav;
+ av = (gvp && (gv = *gvp) && gv != (GV*)&PL_sv_undef) ? GvAV(gv) : Nullav;
/* create and re-create @.*::SUPER::ISA on demand */
if (!av || !SvMAGIC(av)) {
packlen -= 7;
basestash = gv_stashpvn(packname, packlen, TRUE);
gvp = (GV**)hv_fetch(basestash, "ISA", 3, FALSE);
- if (gvp && (gv = *gvp) != (GV*)&sv_undef && (av = GvAV(gv))) {
+ if (gvp && (gv = *gvp) != (GV*)&PL_sv_undef && (av = GvAV(gv))) {
dTHR; /* just for SvREFCNT_dec */
gvp = (GV**)hv_fetch(stash, "ISA", 3, TRUE);
if (!gvp || !(gv = *gvp))
SV* sv = *svp++;
HV* basestash = gv_stashsv(sv, FALSE);
if (!basestash) {
- if (dowarn)
+ if (PL_dowarn)
warn("Can't locate package %s for @%s::ISA",
SvPVX(sv), HvNAME(stash));
continue;
if (cv = GvCV(topgv))
SvREFCNT_dec(cv);
GvCV(topgv) = (CV*)SvREFCNT_inc(GvCV(gv));
- GvCVGEN(topgv) = sub_generation;
+ GvCVGEN(topgv) = PL_sub_generation;
}
return gv;
}
else if (topgv && GvREFCNT(topgv) == 1) {
/* cache the fact that the method is not defined */
- GvCVGEN(topgv) = sub_generation;
+ GvCVGEN(topgv) = PL_sub_generation;
}
}
}
if ((nsplit - origname) == 5 && strnEQ(origname, "SUPER", 5)) {
/* ->SUPER::method should really be looked up in original stash */
SV *tmpstr = sv_2mortal(newSVpvf("%s::SUPER",
- HvNAME(curcop->cop_stash)));
+ HvNAME(PL_curcop->cop_stash)));
stash = gv_stashpvn(SvPVX(tmpstr), SvCUR(tmpstr), TRUE);
DEBUG_o( deb("Treating %s as %s::%s\n",
origname, HvNAME(stash), name) );
gv = gv_fetchmeth(stash, name, nend - name, 0);
if (!gv) {
if (strEQ(name,"import"))
- gv = (GV*)&sv_yes;
+ gv = (GV*)&PL_sv_yes;
else if (autoload)
gv = gv_autoload4(stash, name, nend - name, TRUE);
}
/*
* Inheriting AUTOLOAD for non-methods works ... for now.
*/
- if (dowarn && !method && (GvCVGEN(gv) || GvSTASH(gv) != stash))
+ if (PL_dowarn && !method && (GvCVGEN(gv) || GvSTASH(gv) != stash))
warn(
"Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated",
HvNAME(stash), (int)len, name);
(*namend == ':' && namend[1] == ':'))
{
if (!stash)
- stash = defstash;
+ stash = PL_defstash;
if (!stash || !SvREFCNT(stash)) /* symbol table under destruction */
return Nullgv;
tmpbuf[len] = '\0';
gvp = (GV**)hv_fetch(stash,tmpbuf,len,add);
gv = gvp ? *gvp : Nullgv;
- if (gv && gv != (GV*)&sv_undef) {
+ if (gv && gv != (GV*)&PL_sv_undef) {
if (SvTYPE(gv) != SVt_PVGV)
gv_init(gv, stash, tmpbuf, len, (add & GV_ADDMULTI));
else
}
if (tmpbuf != smallbuf)
Safefree(tmpbuf);
- if (!gv || gv == (GV*)&sv_undef)
+ if (!gv || gv == (GV*)&PL_sv_undef)
return Nullgv;
if (!(stash = GvHV(gv)))
namend++;
name = namend;
if (!*name)
- return gv ? gv : (GV*)*hv_fetch(defstash, "main::", 6, TRUE);
+ return gv ? gv : (GV*)*hv_fetch(PL_defstash, "main::", 6, TRUE);
}
}
len = namend - name;
global = TRUE;
if (global)
- stash = defstash;
- else if ((COP*)curcop == &compiling) {
- stash = curstash;
- if (add && (hints & HINT_STRICT_VARS) &&
+ stash = PL_defstash;
+ else if ((COP*)PL_curcop == &PL_compiling) {
+ stash = PL_curstash;
+ if (add && (PL_hints & HINT_STRICT_VARS) &&
sv_type != SVt_PVCV &&
sv_type != SVt_PVGV &&
sv_type != SVt_PVFM &&
{
gvp = (GV**)hv_fetch(stash,name,len,0);
if (!gvp ||
- *gvp == (GV*)&sv_undef ||
+ *gvp == (GV*)&PL_sv_undef ||
SvTYPE(*gvp) != SVt_PVGV)
{
stash = 0;
}
}
else
- stash = curcop->cop_stash;
+ stash = PL_curcop->cop_stash;
}
else
- stash = defstash;
+ stash = PL_defstash;
}
/* By this point we should have a stash and a name */
warn("Global symbol \"%s\" requires explicit package name",
name);
}
- ++error_count;
- stash = curstash ? curstash : defstash; /* avoid core dumps */
+ ++PL_error_count;
+ stash = PL_curstash ? PL_curstash : PL_defstash; /* avoid core dumps */
add_gvflags = ((sv_type == SVt_PV) ? GVf_IMPORTED_SV
: (sv_type == SVt_PVAV) ? GVf_IMPORTED_AV
: (sv_type == SVt_PVHV) ? GVf_IMPORTED_HV
return Nullgv;
gvp = (GV**)hv_fetch(stash,name,len,add);
- if (!gvp || *gvp == (GV*)&sv_undef)
+ if (!gvp || *gvp == (GV*)&PL_sv_undef)
return Nullgv;
gv = *gvp;
if (SvTYPE(gv) == SVt_PVGV) {
if (strEQ(name, "SIG")) {
HV *hv;
I32 i;
- siggv = gv;
- GvMULTI_on(siggv);
- hv = GvHVn(siggv);
- hv_magic(hv, siggv, 'S');
+ PL_siggv = gv;
+ GvMULTI_on(PL_siggv);
+ hv = GvHVn(PL_siggv);
+ hv_magic(hv, PL_siggv, 'S');
for(i=1;sig_name[i];i++) {
SV ** init;
init=hv_fetch(hv,sig_name[i],strlen(sig_name[i]),1);
if(init)
- sv_setsv(*init,&sv_undef);
+ sv_setsv(*init,&PL_sv_undef);
psig_ptr[i] = 0;
psig_name[i] = 0;
}
case '&':
if (len > 1)
break;
- ampergv = gv;
- sawampersand = TRUE;
+ PL_ampergv = gv;
+ PL_sawampersand = TRUE;
goto ro_magicalize;
case '`':
if (len > 1)
break;
- leftgv = gv;
- sawampersand = TRUE;
+ PL_leftgv = gv;
+ PL_sawampersand = TRUE;
goto ro_magicalize;
case '\'':
if (len > 1)
break;
- rightgv = gv;
- sawampersand = TRUE;
+ PL_rightgv = gv;
+ PL_sawampersand = TRUE;
goto ro_magicalize;
case ':':
if (len > 1)
break;
- sv_setpv(GvSV(gv),chopset);
+ sv_setpv(GvSV(gv),PL_chopset);
goto magicalize;
case '?':
case '!':
if (len > 1)
break;
- if (sv_type > SVt_PV && curcop != &compiling) {
+ if (sv_type > SVt_PV && PL_curcop != &PL_compiling) {
HV* stash = gv_stashpvn("Errno",5,FALSE);
if(!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
dSP;
goto magicalize;
case '#':
case '*':
- if (dowarn && len == 1 && sv_type == SVt_PV)
+ if (PL_dowarn && len == 1 && sv_type == SVt_PV)
warn("Use of $%s is deprecated", name);
/* FALL THROUGH */
case '[':
if (len > 1)
break;
sv_setpv(GvSV(gv),"\f");
- formfeed = GvSV(gv);
+ PL_formfeed = GvSV(gv);
break;
case ';':
if (len > 1)
if (len == 1) {
SV *sv = GvSV(gv);
sv_upgrade(sv, SVt_PVNV);
- sv_setpv(sv, patchlevel);
+ sv_setpv(sv, PL_patchlevel);
(void)sv_2nv(sv);
SvREADONLY_on(sv);
}
if (HeKEY(entry)[HeKLEN(entry)-1] == ':' &&
(gv = (GV*)HeVAL(entry)) && (hv = GvHV(gv)) && HvNAME(hv))
{
- if (hv != defstash)
+ if (hv != PL_defstash)
gv_check(hv); /* nested package */
}
else if (isALPHA(*HeKEY(entry))) {
gv = (GV*)HeVAL(entry);
if (SvTYPE(gv) != SVt_PVGV || GvMULTI(gv))
continue;
- curcop->cop_line = GvLINE(gv);
+ PL_curcop->cop_line = GvLINE(gv);
filegv = GvFILEGV(gv);
- curcop->cop_filegv = filegv;
+ PL_curcop->cop_filegv = filegv;
if (filegv && GvMULTI(filegv)) /* Filename began with slash */
continue;
warn("Name \"%s::%s\" used only once: possible typo",
GV *
newGVgen(char *pack)
{
- return gv_fetchpv(form("%s::_GEN_%ld", pack, (long)gensym++),
+ return gv_fetchpv(form("%s::_GEN_%ld", pack, (long)PL_gensym++),
TRUE, SVt_PVGV);
}
}
else {
/* Adding a new name to a subroutine invalidates method cache */
- sub_generation++;
+ PL_sub_generation++;
}
}
return gp;
}
if (gp->gp_cv) {
/* Deleting the name of a subroutine invalidates method cache */
- sub_generation++;
+ PL_sub_generation++;
}
if (--gp->gp_refcnt > 0) {
if (gp->gp_egv == gv)
AMT *amtp = (mg) ? (AMT*)mg->mg_ptr: (AMT *) NULL;
AMT amt;
- if (mg && amtp->was_ok_am == amagic_generation
- && amtp->was_ok_sub == sub_generation)
+ if (mg && amtp->was_ok_am == PL_amagic_generation
+ && amtp->was_ok_sub == PL_sub_generation)
return AMT_AMAGIC(amtp);
if (amtp && AMT_AMAGIC(amtp)) { /* Have table. */
int i;
DEBUG_o( deb("Recalcing overload magic in package %s\n",HvNAME(stash)) );
- amt.was_ok_am = amagic_generation;
- amt.was_ok_sub = sub_generation;
+ amt.was_ok_am = PL_amagic_generation;
+ amt.was_ok_sub = PL_sub_generation;
amt.fallback = AMGfallNO;
amt.flags = 0;
#ifdef OVERLOAD_VIA_HASH
gvp=(GV**)hv_fetch(stash,"OVERLOAD",8,FALSE); /* A shortcut */
- if (gvp && ((gv = *gvp) != (GV*)&sv_undef && (hv = GvHV(gv)))) {
+ if (gvp && ((gv = *gvp) != (GV*)&PL_sv_undef && (hv = GvHV(gv)))) {
int filled=0;
int i;
char *cp;
cp = (char *)AMG_names[i];
svp = (SV**)hv_fetch(hv, cp, strlen(cp), FALSE);
- if (svp && ((sv = *svp) != &sv_undef)) {
+ if (svp && ((sv = *svp) != &PL_sv_undef)) {
switch (SvTYPE(sv)) {
default:
if (!SvROK(sv)) {
GV *ngv;
DEBUG_o( deb("Resolving method `%.256s' for overloaded `%s' in package `%.256s'\n",
- SvPV(GvSV(gv), na), cp, HvNAME(stash)) );
+ SvPV(GvSV(gv), PL_na), cp, HvNAME(stash)) );
if (!SvPOK(GvSV(gv))
|| !(ngv = gv_fetchmethod_autoload(stash, SvPVX(GvSV(gv)),
FALSE)))
case inc_amg:
if (((cv = cvp[off=add_ass_amg]) && (inc_dec_ass=1))
|| ((cv = cvp[off=add_amg]) && (postpr=1))) {
- right = &sv_yes; lr = -1; assign = 1;
+ right = &PL_sv_yes; lr = -1; assign = 1;
}
break;
case dec_amg:
if (((cv = cvp[off=subtr_ass_amg]) && (inc_dec_ass=1))
|| ((cv = cvp[off=subtr_amg]) && (postpr=1))) {
- right = &sv_yes; lr = -1; assign = 1;
+ right = &PL_sv_yes; lr = -1; assign = 1;
}
break;
case bool__amg:
ENTER;
SAVEOP();
op = (OP *) &myop;
- if (PERLDB_SUB && curstash != debstash)
+ if (PERLDB_SUB && PL_curstash != PL_debstash)
op->op_private |= OPpENTERSUB_DB;
PUTBACK;
pp_pushmark(ARGS);
EXTEND(SP, notfound + 5);
PUSHs(lr>0? right: left);
PUSHs(lr>0? left: right);
- PUSHs( lr > 0 ? &sv_yes : ( assign ? &sv_undef : &sv_no ));
+ PUSHs( lr > 0 ? &PL_sv_yes : ( assign ? &PL_sv_undef : &PL_sv_no ));
if (notfound) {
PUSHs( sv_2mortal(newSVpv((char *)AMG_names[method + assignshift],0)) );
}
new_he(void)
{
HE* he;
- if (he_root) {
- he = he_root;
- he_root = HeNEXT(he);
+ if (PL_he_root) {
+ he = PL_he_root;
+ PL_he_root = HeNEXT(he);
return he;
}
return more_he();
STATIC void
del_he(HE *p)
{
- HeNEXT(p) = (HE*)he_root;
- he_root = p;
+ HeNEXT(p) = (HE*)PL_he_root;
+ PL_he_root = p;
}
STATIC HE*
{
register HE* he;
register HE* heend;
- New(54, he_root, 1008/sizeof(HE), HE);
- he = he_root;
+ New(54, PL_he_root, 1008/sizeof(HE), HE);
+ he = PL_he_root;
heend = &he[1008 / sizeof(HE) - 1];
while (he < heend) {
HeNEXT(he) = (HE*)(he + 1);
dTHR;
sv = sv_newmortal();
mg_copy((SV*)hv, sv, key, klen);
- hv_fetch_sv = sv;
- return &hv_fetch_sv;
+ PL_hv_fetch_sv = sv;
+ return &PL_hv_fetch_sv;
}
#ifdef ENV_IS_CASELESS
else if (mg_find((SV*)hv,'E')) {
sv = sv_newmortal();
keysv = sv_2mortal(newSVsv(keysv));
mg_copy((SV*)hv, sv, (char*)keysv, HEf_SVKEY);
- if (!HeKEY_hek(&hv_fetch_ent_mh)) {
+ if (!HeKEY_hek(&PL_hv_fetch_ent_mh)) {
char *k;
New(54, k, HEK_BASESIZE + sizeof(SV*), char);
- HeKEY_hek(&hv_fetch_ent_mh) = (HEK*)k;
+ HeKEY_hek(&PL_hv_fetch_ent_mh) = (HEK*)k;
}
- HeSVKEY_set(&hv_fetch_ent_mh, keysv);
- HeVAL(&hv_fetch_ent_mh) = sv;
- return &hv_fetch_ent_mh;
+ HeSVKEY_set(&PL_hv_fetch_ent_mh, keysv);
+ HeVAL(&PL_hv_fetch_ent_mh) = sv;
+ return &PL_hv_fetch_ent_mh;
}
#ifdef ENV_IS_CASELESS
else if (mg_find((SV*)hv,'E')) {
bool needs_store;
hv_magic_check (hv, &needs_copy, &needs_store);
if (needs_copy) {
- bool save_taint = tainted;
- if (tainting)
- tainted = SvTAINTED(keysv);
+ bool save_taint = PL_tainted;
+ if (PL_tainting)
+ PL_tainted = SvTAINTED(keysv);
keysv = sv_2mortal(newSVsv(keysv));
mg_copy((SV*)hv, val, (char*)keysv, HEf_SVKEY);
TAINT_IF(save_taint);
register HE *entry;
register HE **oentry;
- nomemok = TRUE;
+ PL_nomemok = TRUE;
#if defined(STRANGE_MALLOC) || defined(MYMALLOC)
Renew(a, ARRAY_ALLOC_BYTES(newsize), char);
if (!a) {
#define MALLOC_OVERHEAD 16
New(2, a, ARRAY_ALLOC_BYTES(newsize), char);
if (!a) {
- nomemok = FALSE;
+ PL_nomemok = FALSE;
return;
}
Copy(xhv->xhv_array, a, oldsize * sizeof(HE*), char);
Safefree(xhv->xhv_array);
#endif
- nomemok = FALSE;
+ PL_nomemok = FALSE;
Zero(&a[oldsize * sizeof(HE*)], (newsize-oldsize) * sizeof(HE*), char); /* zero 2nd half*/
xhv->xhv_max = --newsize;
xhv->xhv_array = a;
a = xhv->xhv_array;
if (a) {
- nomemok = TRUE;
+ PL_nomemok = TRUE;
#if defined(STRANGE_MALLOC) || defined(MYMALLOC)
Renew(a, ARRAY_ALLOC_BYTES(newsize), char);
if (!a) {
#else
New(2, a, ARRAY_ALLOC_BYTES(newsize), char);
if (!a) {
- nomemok = FALSE;
+ PL_nomemok = FALSE;
return;
}
Copy(xhv->xhv_array, a, oldsize * sizeof(HE*), char);
else
Safefree(xhv->xhv_array);
#endif
- nomemok = FALSE;
+ PL_nomemok = FALSE;
Zero(&a[oldsize * sizeof(HE*)], (newsize-oldsize) * sizeof(HE*), char); /* zero 2nd half*/
}
else {
return;
val = HeVAL(entry);
if (val && isGV(val) && GvCVu(val) && HvNAME(hv))
- sub_generation++; /* may be deletion of method from stash */
+ PL_sub_generation++; /* may be deletion of method from stash */
SvREFCNT_dec(val);
if (HeKLEN(entry) == HEf_SVKEY) {
SvREFCNT_dec(HeKEY_sv(entry));
if (!entry)
return;
if (isGV(HeVAL(entry)) && GvCVu(HeVAL(entry)) && HvNAME(hv))
- sub_generation++; /* may be deletion of method from stash */
+ PL_sub_generation++; /* may be deletion of method from stash */
sv_2mortal(HeVAL(entry)); /* free between statements */
if (HeKLEN(entry) == HEf_SVKEY) {
sv_2mortal(HeKEY_sv(entry));
if (--*Svp == Nullsv)
hv_delete(strtab, str, len, G_DISCARD, hash);
} */
- xhv = (XPVHV*)SvANY(strtab);
+ xhv = (XPVHV*)SvANY(PL_strtab);
/* assert(xhv_array != 0) */
oentry = &((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max];
for (entry = *oentry; entry; i=0, oentry = &HeNEXT(entry), entry = *oentry) {
if (!(Svp = hv_fetch(strtab, str, len, FALSE)))
hv_store(strtab, str, len, Nullsv, hash);
*/
- xhv = (XPVHV*)SvANY(strtab);
+ xhv = (XPVHV*)SvANY(PL_strtab);
/* assert(xhv_array != 0) */
oentry = &((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max];
for (entry = *oentry; entry; i=0, entry = HeNEXT(entry)) {
if (i) { /* initial entry? */
++xhv->xhv_fill;
if (xhv->xhv_keys > xhv->xhv_max)
- hsplit(strtab);
+ hsplit(PL_strtab);
}
}
HeKEY_sv(he) : \
sv_2mortal(newSVpv(HeKEY(he), \
HeKLEN(he)))) : \
- &sv_undef)
+ &PL_sv_undef)
#define HeSVKEY_set(he,sv) ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv))
#define Nullhek Null(HEK*)
T_U_LONG
$var = (unsigned long)SvIV($arg)
T_CHAR
- $var = (char)*SvPV($arg,na)
+ $var = (char)*SvPV($arg,PL_na)
T_U_CHAR
$var = (unsigned char)SvIV($arg)
T_FLOAT
T_DOUBLE
$var = (double)SvNV($arg)
T_PV
- $var = ($type)SvPV($arg,na)
+ $var = ($type)SvPV($arg,PL_na)
T_PTR
$var = ($type)SvIV($arg)
T_PTRREF
T_OPAQUE
$var NOT IMPLEMENTED
T_OPAQUEPTR
- $var = ($type)SvPV($arg,na)
+ $var = ($type)SvPV($arg,PL_na)
T_PACKED
$var = XS_unpack_$ntype($arg)
T_PACKEDARRAY
}
print Q<<"EOF";;
-# ST(0) = &sv_yes;
-# XSRETURN(1);
+# XSRETURN_YES;
#]]
#
EOF
switch (*mg->mg_ptr) {
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': case '&':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
paren = atoi(mg->mg_ptr);
getparen:
if (paren <= rx->nparens &&
}
return 0;
case '+':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
paren = rx->lastparen;
if (paren)
goto getparen;
}
return 0;
case '`':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
if ((s = rx->subbeg) && rx->startp[0]) {
i = rx->startp[0] - s;
if (i >= 0)
}
return 0;
case '\'':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
if (rx->subend && (s = rx->endp[0])) {
i = rx->subend - s;
if (i >= 0)
}
return 0;
case ',':
- return (STRLEN)ofslen;
+ return (STRLEN)PL_ofslen;
case '\\':
- return (STRLEN)orslen;
+ return (STRLEN)PL_orslen;
}
magic_get(sv,mg);
if (!SvPOK(sv) && SvNIOK(sv))
- sv_2pv(sv, &na);
+ sv_2pv(sv, &PL_na);
if (SvPOK(sv))
return SvCUR(sv);
return 0;
switch (*mg->mg_ptr) {
case '\001': /* ^A */
- sv_setsv(sv, bodytarget);
+ sv_setsv(sv, PL_bodytarget);
break;
case '\004': /* ^D */
- sv_setiv(sv, (IV)(debug & 32767));
+ sv_setiv(sv, (IV)(PL_debug & 32767));
break;
case '\005': /* ^E */
#ifdef VMS
SvNOK_on(sv); /* what a wonderful hack! */
break;
case '\006': /* ^F */
- sv_setiv(sv, (IV)maxsysfd);
+ sv_setiv(sv, (IV)PL_maxsysfd);
break;
case '\010': /* ^H */
- sv_setiv(sv, (IV)hints);
+ sv_setiv(sv, (IV)PL_hints);
break;
case '\t': /* ^I */
- if (inplace)
- sv_setpv(sv, inplace);
+ if (PL_inplace)
+ sv_setpv(sv, PL_inplace);
else
- sv_setsv(sv, &sv_undef);
+ sv_setsv(sv, &PL_sv_undef);
break;
case '\017': /* ^O */
- sv_setpv(sv, osname);
+ sv_setpv(sv, PL_osname);
break;
case '\020': /* ^P */
- sv_setiv(sv, (IV)perldb);
+ sv_setiv(sv, (IV)PL_perldb);
break;
case '\023': /* ^S */
{
dTHR;
- if (lex_state != LEX_NOTPARSING)
+ if (PL_lex_state != LEX_NOTPARSING)
SvOK_off(sv);
- else if (in_eval)
+ else if (PL_in_eval)
sv_setiv(sv, 1);
else
sv_setiv(sv, 0);
#ifdef BIG_TIME
sv_setnv(sv, basetime);
#else
- sv_setiv(sv, (IV)basetime);
+ sv_setiv(sv, (IV)PL_basetime);
#endif
break;
case '\027': /* ^W */
- sv_setiv(sv, (IV)dowarn);
+ sv_setiv(sv, (IV)PL_dowarn);
break;
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': case '&':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
/*
* Pre-threads, this was paren = atoi(GvENAME((GV*)mg->mg_obj));
* XXX Does the new way break anything?
getrx:
if (i >= 0) {
bool was_tainted;
- if (tainting) {
- was_tainted = tainted;
- tainted = FALSE;
+ if (PL_tainting) {
+ was_tainted = PL_tainted;
+ PL_tainted = FALSE;
}
sv_setpvn(sv,s,i);
- if (tainting)
- tainted = (was_tainted || RX_MATCH_TAINTED(rx));
+ if (PL_tainting)
+ PL_tainted = (was_tainted || RX_MATCH_TAINTED(rx));
break;
}
}
}
- sv_setsv(sv,&sv_undef);
+ sv_setsv(sv,&PL_sv_undef);
break;
case '+':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
paren = rx->lastparen;
if (paren)
goto getparen;
}
- sv_setsv(sv,&sv_undef);
+ sv_setsv(sv,&PL_sv_undef);
break;
case '`':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
if ((s = rx->subbeg) && rx->startp[0]) {
i = rx->startp[0] - s;
goto getrx;
}
}
- sv_setsv(sv,&sv_undef);
+ sv_setsv(sv,&PL_sv_undef);
break;
case '\'':
- if (curpm && (rx = curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
if (rx->subend && (s = rx->endp[0])) {
i = rx->subend - s;
goto getrx;
}
}
- sv_setsv(sv,&sv_undef);
+ sv_setsv(sv,&PL_sv_undef);
break;
case '.':
#ifndef lint
- if (GvIO(last_in_gv)) {
- sv_setiv(sv, (IV)IoLINES(GvIO(last_in_gv)));
+ if (GvIO(PL_last_in_gv)) {
+ sv_setiv(sv, (IV)IoLINES(GvIO(PL_last_in_gv)));
}
#endif
break;
}
break;
case '^':
- s = IoTOP_NAME(GvIOp(defoutgv));
+ s = IoTOP_NAME(GvIOp(PL_defoutgv));
if (s)
sv_setpv(sv,s);
else {
- sv_setpv(sv,GvENAME(defoutgv));
+ sv_setpv(sv,GvENAME(PL_defoutgv));
sv_catpv(sv,"_TOP");
}
break;
case '~':
- s = IoFMT_NAME(GvIOp(defoutgv));
+ s = IoFMT_NAME(GvIOp(PL_defoutgv));
if (!s)
- s = GvENAME(defoutgv);
+ s = GvENAME(PL_defoutgv);
sv_setpv(sv,s);
break;
#ifndef lint
case '=':
- sv_setiv(sv, (IV)IoPAGE_LEN(GvIOp(defoutgv)));
+ sv_setiv(sv, (IV)IoPAGE_LEN(GvIOp(PL_defoutgv)));
break;
case '-':
- sv_setiv(sv, (IV)IoLINES_LEFT(GvIOp(defoutgv)));
+ sv_setiv(sv, (IV)IoLINES_LEFT(GvIOp(PL_defoutgv)));
break;
case '%':
- sv_setiv(sv, (IV)IoPAGE(GvIOp(defoutgv)));
+ sv_setiv(sv, (IV)IoPAGE(GvIOp(PL_defoutgv)));
break;
#endif
case ':':
case '/':
break;
case '[':
- WITH_THR(sv_setiv(sv, (IV)curcop->cop_arybase));
+ WITH_THR(sv_setiv(sv, (IV)PL_curcop->cop_arybase));
break;
case '|':
- sv_setiv(sv, (IV)(IoFLAGS(GvIOp(defoutgv)) & IOf_FLUSH) != 0 );
+ sv_setiv(sv, (IV)(IoFLAGS(GvIOp(PL_defoutgv)) & IOf_FLUSH) != 0 );
break;
case ',':
- sv_setpvn(sv,ofs,ofslen);
+ sv_setpvn(sv,PL_ofs,PL_ofslen);
break;
case '\\':
- sv_setpvn(sv,ors,orslen);
+ sv_setpvn(sv,PL_ors,PL_orslen);
break;
case '#':
- sv_setpv(sv,ofmt);
+ sv_setpv(sv,PL_ofmt);
break;
case '!':
#ifdef VMS
SvNOK_on(sv); /* what a wonderful hack! */
break;
case '<':
- sv_setiv(sv, (IV)uid);
+ sv_setiv(sv, (IV)PL_uid);
break;
case '>':
- sv_setiv(sv, (IV)euid);
+ sv_setiv(sv, (IV)PL_euid);
break;
case '(':
- sv_setiv(sv, (IV)gid);
- sv_setpvf(sv, "%Vd", (IV)gid);
+ sv_setiv(sv, (IV)PL_gid);
+ sv_setpvf(sv, "%Vd", (IV)PL_gid);
goto add_groups;
case ')':
- sv_setiv(sv, (IV)egid);
- sv_setpvf(sv, "%Vd", (IV)egid);
+ sv_setiv(sv, (IV)PL_egid);
+ sv_setpvf(sv, "%Vd", (IV)PL_egid);
add_groups:
#ifdef HAS_GETGROUPS
{
#if !defined(OS2) && !defined(AMIGAOS) && !defined(WIN32) && !defined(MSDOS)
/* And you'll never guess what the dog had */
/* in its mouth... */
- if (tainting) {
+ if (PL_tainting) {
MgTAINTEDDIR_off(mg);
#ifdef VMS
if (s && klen == 8 && strEQ(ptr, "DCL$PATH")) {
int
magic_clearenv(SV *sv, MAGIC *mg)
{
- my_setenv(MgPV(mg,na),Nullch);
+ my_setenv(MgPV(mg,PL_na),Nullch);
return 0;
}
die("Can't make list assignment to %%ENV on this system");
#else
dTHR;
- if (localizing) {
+ if (PL_localizing) {
HE* entry;
magic_clear_all_env(sv,mg);
hv_iterinit((HV*)sv);
while (entry = hv_iternext((HV*)sv)) {
I32 keylen;
my_setenv(hv_iterkey(entry, &keylen),
- SvPV(hv_iterval((HV*)sv, entry), na));
+ SvPV(hv_iterval((HV*)sv, entry), PL_na));
}
}
#endif
#else
I32 i;
- if (environ == origenviron)
+ if (environ == PL_origenviron)
New(901, environ, 1, char*);
else
for (i = 0; environ[i]; i++)
{
I32 i;
/* Are we fetching a signal entry? */
- i = whichsig(MgPV(mg,na));
+ i = whichsig(MgPV(mg,PL_na));
if (i) {
if(psig_ptr[i])
sv_setsv(sv,psig_ptr[i]);
if(sigstate == SIG_IGN)
sv_setpv(sv,"IGNORE");
else
- sv_setsv(sv,&sv_undef);
+ sv_setsv(sv,&PL_sv_undef);
psig_ptr[i] = SvREFCNT_inc(sv);
SvTEMP_off(sv);
}
{
I32 i;
/* Are we clearing a signal entry? */
- i = whichsig(MgPV(mg,na));
+ i = whichsig(MgPV(mg,PL_na));
if (i) {
if(psig_ptr[i]) {
SvREFCNT_dec(psig_ptr[i]);
I32 i;
SV** svp;
- s = MgPV(mg,na);
+ s = MgPV(mg,PL_na);
if (*s == '_') {
if (strEQ(s,"__DIE__"))
- svp = &diehook;
+ svp = &PL_diehook;
else if (strEQ(s,"__WARN__"))
- svp = &warnhook;
+ svp = &PL_warnhook;
else if (strEQ(s,"__PARSE__"))
- svp = &parsehook;
+ svp = &PL_parsehook;
else
croak("No such hook: %s", s);
i = 0;
else {
i = whichsig(s); /* ...no, a brick */
if (!i) {
- if (dowarn || strEQ(s,"ALARM"))
+ if (PL_dowarn || strEQ(s,"ALARM"))
warn("No such signal: SIG%s", s);
return 0;
}
}
if (SvTYPE(sv) == SVt_PVGV || SvROK(sv)) {
if (i)
- (void)rsignal(i, sighandlerp);
+ (void)rsignal(i, PL_sighandlerp);
else
*svp = SvREFCNT_inc(sv);
return 0;
}
- s = SvPV_force(sv,na);
+ s = SvPV_force(sv,PL_na);
if (strEQ(s,"IGNORE")) {
if (i)
(void)rsignal(i, SIG_IGN);
if (!strchr(s,':') && !strchr(s,'\''))
sv_setpv(sv, form("main::%s", s));
if (i)
- (void)rsignal(i, sighandlerp);
+ (void)rsignal(i, PL_sighandlerp);
else
*svp = SvREFCNT_inc(sv);
}
int
magic_setisa(SV *sv, MAGIC *mg)
{
- sub_generation++;
+ PL_sub_generation++;
return 0;
}
magic_setamagic(SV *sv, MAGIC *mg)
{
/* HV_badAMAGIC_on(Sv_STASH(sv)); */
- amagic_generation++;
+ PL_amagic_generation++;
return 0;
}
PUSHSTACKi(PERLSI_MAGIC);
if (magic_methcall(mg, meth, G_SCALAR, 2, NULL)) {
- sv_setsv(sv, *stack_sp--);
+ sv_setsv(sv, *PL_stack_sp--);
}
POPSTACK;
SAVETMPS;
PUSHSTACKi(PERLSI_MAGIC);
if (magic_methcall(mg, "FETCHSIZE", G_SCALAR, 2, NULL)) {
- sv = *stack_sp--;
+ sv = *PL_stack_sp--;
retval = (U32) SvIV(sv)-1;
}
POPSTACK;
PUTBACK;
if (perl_call_method(meth, G_SCALAR))
- sv_setsv(key, *stack_sp--);
+ sv_setsv(key, *PL_stack_sp--);
POPSTACK;
FREETMPS;
GV* gv;
SV** svp;
- gv = DBline;
+ gv = PL_DBline;
i = SvTRUE(sv);
svp = av_fetch(GvAV(gv),
- atoi(MgPV(mg,na)), FALSE);
+ atoi(MgPV(mg,PL_na)), FALSE);
if (svp && SvIOKp(*svp) && (o = (OP*)SvSTASH(*svp)))
o->op_private = i;
else
magic_getarylen(SV *sv, MAGIC *mg)
{
dTHR;
- sv_setiv(sv, AvFILL((AV*)mg->mg_obj) + curcop->cop_arybase);
+ sv_setiv(sv, AvFILL((AV*)mg->mg_obj) + PL_curcop->cop_arybase);
return 0;
}
magic_setarylen(SV *sv, MAGIC *mg)
{
dTHR;
- av_fill((AV*)mg->mg_obj, SvIV(sv) - curcop->cop_arybase);
+ av_fill((AV*)mg->mg_obj, SvIV(sv) - PL_curcop->cop_arybase);
return 0;
}
mg = mg_find(lsv, 'g');
if (mg && mg->mg_len >= 0) {
dTHR;
- sv_setiv(sv, mg->mg_len + curcop->cop_arybase);
+ sv_setiv(sv, mg->mg_len + PL_curcop->cop_arybase);
return 0;
}
}
}
len = SvPOK(lsv) ? SvCUR(lsv) : sv_len(lsv);
- WITH_THR(pos = SvIV(sv) - curcop->cop_arybase);
+ WITH_THR(pos = SvIV(sv) - PL_curcop->cop_arybase);
if (pos < 0) {
pos += len;
if (pos < 0)
if (!SvOK(sv))
return 0;
- s = SvPV(sv, na);
+ s = SvPV(sv, PL_na);
if (*s == '*' && s[1])
s++;
gv = gv_fetchpv(s,TRUE, SVt_PVGV);
magic_settaint(SV *sv, MAGIC *mg)
{
dTHR;
- if (localizing) {
- if (localizing == 1)
+ if (PL_localizing) {
+ if (PL_localizing == 1)
mg->mg_len <<= 1;
else
mg->mg_len >>= 1;
}
- else if (tainted)
+ else if (PL_tainted)
mg->mg_len |= 1;
else
mg->mg_len &= ~1;
if ((I32)LvTARGOFF(sv) <= AvFILL(av))
targ = AvARRAY(av)[LvTARGOFF(sv)];
}
- if (targ && targ != &sv_undef) {
+ if (targ && targ != &PL_sv_undef) {
dTHR; /* just for SvREFCNT_dec */
/* somebody else defined it for us */
SvREFCNT_dec(LvTARG(sv));
}
else
targ = LvTARG(sv);
- sv_setsv(sv, targ ? targ : &sv_undef);
+ sv_setsv(sv, targ ? targ : &PL_sv_undef);
return 0;
}
if (svp)
value = *svp;
}
- if (!value || value == &sv_undef)
- croak(no_helem, SvPV(mg->mg_obj, na));
+ if (!value || value == &PL_sv_undef)
+ croak(no_helem, SvPV(mg->mg_obj, PL_na));
}
else {
AV* av = (AV*)LvTARG(sv);
LvTARG(sv) = Nullsv; /* array can't be extended */
else {
SV** svp = av_fetch(av, LvTARGOFF(sv), TRUE);
- if (!svp || (value = *svp) == &sv_undef)
+ if (!svp || (value = *svp) == &PL_sv_undef)
croak(no_aelem, (I32)LvTARGOFF(sv));
}
}
STRLEN len;
switch (*mg->mg_ptr) {
case '\001': /* ^A */
- sv_setsv(bodytarget, sv);
+ sv_setsv(PL_bodytarget, sv);
break;
case '\004': /* ^D */
- debug = (SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)) | 0x80000000;
+ PL_debug = (SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)) | 0x80000000;
DEBUG_x(dump_all());
break;
case '\005': /* ^E */
#endif
break;
case '\006': /* ^F */
- maxsysfd = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ PL_maxsysfd = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
break;
case '\010': /* ^H */
- hints = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ PL_hints = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
break;
case '\t': /* ^I */
- if (inplace)
- Safefree(inplace);
+ if (PL_inplace)
+ Safefree(PL_inplace);
if (SvOK(sv))
- inplace = savepv(SvPV(sv,na));
+ PL_inplace = savepv(SvPV(sv,PL_na));
else
- inplace = Nullch;
+ PL_inplace = Nullch;
break;
case '\017': /* ^O */
- if (osname)
- Safefree(osname);
+ if (PL_osname)
+ Safefree(PL_osname);
if (SvOK(sv))
- osname = savepv(SvPV(sv,na));
+ PL_osname = savepv(SvPV(sv,PL_na));
else
- osname = Nullch;
+ PL_osname = Nullch;
break;
case '\020': /* ^P */
- perldb = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ PL_perldb = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
break;
case '\024': /* ^T */
#ifdef BIG_TIME
basetime = (Time_t)(SvNOK(sv) ? SvNVX(sv) : sv_2nv(sv));
#else
- basetime = (Time_t)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
+ PL_basetime = (Time_t)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
#endif
break;
case '\027': /* ^W */
- dowarn = (bool)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
+ PL_dowarn = (bool)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
break;
case '.':
- if (localizing) {
- if (localizing == 1)
- save_sptr((SV**)&last_in_gv);
+ if (PL_localizing) {
+ if (PL_localizing == 1)
+ save_sptr((SV**)&PL_last_in_gv);
}
- else if (SvOK(sv) && GvIO(last_in_gv))
- IoLINES(GvIOp(last_in_gv)) = (long)SvIV(sv);
+ else if (SvOK(sv) && GvIO(PL_last_in_gv))
+ IoLINES(GvIOp(PL_last_in_gv)) = (long)SvIV(sv);
break;
case '^':
- Safefree(IoTOP_NAME(GvIOp(defoutgv)));
- IoTOP_NAME(GvIOp(defoutgv)) = s = savepv(SvPV(sv,na));
- IoTOP_GV(GvIOp(defoutgv)) = gv_fetchpv(s,TRUE, SVt_PVIO);
+ Safefree(IoTOP_NAME(GvIOp(PL_defoutgv)));
+ IoTOP_NAME(GvIOp(PL_defoutgv)) = s = savepv(SvPV(sv,PL_na));
+ IoTOP_GV(GvIOp(PL_defoutgv)) = gv_fetchpv(s,TRUE, SVt_PVIO);
break;
case '~':
- Safefree(IoFMT_NAME(GvIOp(defoutgv)));
- IoFMT_NAME(GvIOp(defoutgv)) = s = savepv(SvPV(sv,na));
- IoFMT_GV(GvIOp(defoutgv)) = gv_fetchpv(s,TRUE, SVt_PVIO);
+ Safefree(IoFMT_NAME(GvIOp(PL_defoutgv)));
+ IoFMT_NAME(GvIOp(PL_defoutgv)) = s = savepv(SvPV(sv,PL_na));
+ IoFMT_GV(GvIOp(PL_defoutgv)) = gv_fetchpv(s,TRUE, SVt_PVIO);
break;
case '=':
- IoPAGE_LEN(GvIOp(defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
+ IoPAGE_LEN(GvIOp(PL_defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
break;
case '-':
- IoLINES_LEFT(GvIOp(defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
- if (IoLINES_LEFT(GvIOp(defoutgv)) < 0L)
- IoLINES_LEFT(GvIOp(defoutgv)) = 0L;
+ IoLINES_LEFT(GvIOp(PL_defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
+ if (IoLINES_LEFT(GvIOp(PL_defoutgv)) < 0L)
+ IoLINES_LEFT(GvIOp(PL_defoutgv)) = 0L;
break;
case '%':
- IoPAGE(GvIOp(defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
+ IoPAGE(GvIOp(PL_defoutgv)) = (long)(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
break;
case '|':
{
- IO *io = GvIOp(defoutgv);
+ IO *io = GvIOp(PL_defoutgv);
if ((SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)) == 0)
IoFLAGS(io) &= ~IOf_FLUSH;
else {
break;
case '*':
i = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
- multiline = (i != 0);
+ PL_multiline = (i != 0);
break;
case '/':
- SvREFCNT_dec(nrs);
- nrs = newSVsv(sv);
- SvREFCNT_dec(rs);
- rs = SvREFCNT_inc(nrs);
+ SvREFCNT_dec(PL_nrs);
+ PL_nrs = newSVsv(sv);
+ SvREFCNT_dec(PL_rs);
+ PL_rs = SvREFCNT_inc(PL_nrs);
break;
case '\\':
- if (ors)
- Safefree(ors);
+ if (PL_ors)
+ Safefree(PL_ors);
if (SvOK(sv) || SvGMAGICAL(sv))
- ors = savepv(SvPV(sv,orslen));
+ PL_ors = savepv(SvPV(sv,PL_orslen));
else {
- ors = Nullch;
- orslen = 0;
+ PL_ors = Nullch;
+ PL_orslen = 0;
}
break;
case ',':
- if (ofs)
- Safefree(ofs);
- ofs = savepv(SvPV(sv, ofslen));
+ if (PL_ofs)
+ Safefree(PL_ofs);
+ PL_ofs = savepv(SvPV(sv, PL_ofslen));
break;
case '#':
- if (ofmt)
- Safefree(ofmt);
- ofmt = savepv(SvPV(sv,na));
+ if (PL_ofmt)
+ Safefree(PL_ofmt);
+ PL_ofmt = savepv(SvPV(sv,PL_na));
break;
case '[':
- compiling.cop_arybase = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ PL_compiling.cop_arybase = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
break;
case '?':
#ifdef COMPLEX_STATUS
(SvIV(sv) == EVMSERR) ? 4 : vaxc$errno);
break;
case '<':
- uid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
- if (delaymagic) {
- delaymagic |= DM_RUID;
+ PL_uid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ if (PL_delaymagic) {
+ PL_delaymagic |= DM_RUID;
break; /* don't do magic till later */
}
#ifdef HAS_SETRUID
(void)setruid((Uid_t)uid);
#else
#ifdef HAS_SETREUID
- (void)setreuid((Uid_t)uid, (Uid_t)-1);
+ (void)setreuid((Uid_t)PL_uid, (Uid_t)-1);
#else
#ifdef HAS_SETRESUID
(void)setresuid((Uid_t)uid, (Uid_t)-1, (Uid_t)-1);
#endif
#endif
#endif
- uid = (I32)PerlProc_getuid();
- tainting |= (uid && (euid != uid || egid != gid));
+ PL_uid = (I32)PerlProc_getuid();
+ PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
break;
case '>':
- euid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
- if (delaymagic) {
- delaymagic |= DM_EUID;
+ PL_euid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ if (PL_delaymagic) {
+ PL_delaymagic |= DM_EUID;
break; /* don't do magic till later */
}
#ifdef HAS_SETEUID
- (void)seteuid((Uid_t)euid);
+ (void)seteuid((Uid_t)PL_euid);
#else
#ifdef HAS_SETREUID
(void)setreuid((Uid_t)-1, (Uid_t)euid);
#endif
#endif
#endif
- euid = (I32)PerlProc_geteuid();
- tainting |= (uid && (euid != uid || egid != gid));
+ PL_euid = (I32)PerlProc_geteuid();
+ PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
break;
case '(':
- gid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
- if (delaymagic) {
- delaymagic |= DM_RGID;
+ PL_gid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
+ if (PL_delaymagic) {
+ PL_delaymagic |= DM_RGID;
break; /* don't do magic till later */
}
#ifdef HAS_SETRGID
(void)setrgid((Gid_t)gid);
#else
#ifdef HAS_SETREGID
- (void)setregid((Gid_t)gid, (Gid_t)-1);
+ (void)setregid((Gid_t)PL_gid, (Gid_t)-1);
#else
#ifdef HAS_SETRESGID
(void)setresgid((Gid_t)gid, (Gid_t)-1, (Gid_t) 1);
#endif
#endif
#endif
- gid = (I32)PerlProc_getgid();
- tainting |= (uid && (euid != uid || egid != gid));
+ PL_gid = (I32)PerlProc_getgid();
+ PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
break;
case ')':
#ifdef HAS_SETGROUPS
{
- char *p = SvPV(sv, na);
+ char *p = SvPV(sv, PL_na);
Groups_t gary[NGROUPS];
SET_NUMERIC_STANDARD();
while (isSPACE(*p))
++p;
- egid = I_V(atof(p));
+ PL_egid = I_V(atof(p));
for (i = 0; i < NGROUPS; ++i) {
while (*p && !isSPACE(*p))
++p;
#else /* HAS_SETGROUPS */
egid = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
#endif /* HAS_SETGROUPS */
- if (delaymagic) {
- delaymagic |= DM_EGID;
+ if (PL_delaymagic) {
+ PL_delaymagic |= DM_EGID;
break; /* don't do magic till later */
}
#ifdef HAS_SETEGID
- (void)setegid((Gid_t)egid);
+ (void)setegid((Gid_t)PL_egid);
#else
#ifdef HAS_SETREGID
(void)setregid((Gid_t)-1, (Gid_t)egid);
#endif
#endif
#endif
- egid = (I32)PerlProc_getegid();
- tainting |= (uid && (euid != uid || egid != gid));
+ PL_egid = (I32)PerlProc_getegid();
+ PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
break;
case ':':
- chopset = SvPV_force(sv,na);
+ PL_chopset = SvPV_force(sv,PL_na);
break;
case '0':
- if (!origalen) {
- s = origargv[0];
+ if (!PL_origalen) {
+ s = PL_origargv[0];
s += strlen(s);
/* See if all the arguments are contiguous in memory */
- for (i = 1; i < origargc; i++) {
- if (origargv[i] == s + 1
+ for (i = 1; i < PL_origargc; i++) {
+ if (PL_origargv[i] == s + 1
#ifdef OS2
|| origargv[i] == s + 2
#endif
break;
}
/* can grab env area too? */
- if (origenviron && (origenviron[0] == s + 1
+ if (PL_origenviron && (PL_origenviron[0] == s + 1
#ifdef OS2
|| (origenviron[0] == s + 9 && (s += 8))
#endif
)) {
my_setenv("NoNe SuCh", Nullch);
/* force copy of environment */
- for (i = 0; origenviron[i]; i++)
- if (origenviron[i] == s + 1)
+ for (i = 0; PL_origenviron[i]; i++)
+ if (PL_origenviron[i] == s + 1)
s += strlen(++s);
else
break;
}
- origalen = s - origargv[0];
+ PL_origalen = s - PL_origargv[0];
}
s = SvPV_force(sv,len);
i = len;
- if (i >= origalen) {
- i = origalen;
+ if (i >= PL_origalen) {
+ i = PL_origalen;
/* don't allow system to limit $0 seen by script */
/* SvCUR_set(sv, i); *SvEND(sv) = '\0'; */
- Copy(s, origargv[0], i, char);
- s = origargv[0]+i;
+ Copy(s, PL_origargv[0], i, char);
+ s = PL_origargv[0]+i;
*s = '\0';
}
else {
- Copy(s, origargv[0], i, char);
- s = origargv[0]+i;
+ Copy(s, PL_origargv[0], i, char);
+ s = PL_origargv[0]+i;
*s++ = '\0';
- while (++i < origalen)
+ while (++i < PL_origalen)
*s++ = ' ';
- s = origargv[0]+i;
- for (i = 1; i < origargc; i++)
- origargv[i] = Nullch;
+ s = PL_origargv[0]+i;
+ for (i = 1; i < PL_origargc; i++)
+ PL_origargv[i] = Nullch;
}
break;
#ifdef USE_THREADS
U32 flags = *(U32*)p;
if (flags & 1)
- savestack_ix -= 5; /* Unprotect save in progress. */
+ PL_savestack_ix -= 5; /* Unprotect save in progress. */
/* cxstack_ix-- Not needed, die already unwound it. */
if (flags & 64)
SvREFCNT_dec(sig_sv);
dSP;
GV *gv = Nullgv;
HV *st;
- SV *sv, *tSv = Sv;
+ SV *sv, *tSv = PL_Sv;
CV *cv = Nullcv;
OP *myop = op;
U32 flags = 0;
- I32 o_save_i = savestack_ix, type;
- XPV *tXpv = Xpv;
+ I32 o_save_i = PL_savestack_ix, type;
+ XPV *tXpv = PL_Xpv;
- if (savestack_ix + 15 <= savestack_max)
+ if (PL_savestack_ix + 15 <= PL_savestack_max)
flags |= 1;
- if (markstack_ptr < markstack_max - 2)
+ if (PL_markstack_ptr < PL_markstack_max - 2)
flags |= 4;
- if (retstack_ix < retstack_max - 2)
+ if (PL_retstack_ix < PL_retstack_max - 2)
flags |= 8;
- if (scopestack_ix < scopestack_max - 3)
+ if (PL_scopestack_ix < PL_scopestack_max - 3)
flags |= 16;
if (!psig_ptr[sig])
/* Max number of items pushed there is 3*n or 4. We cannot fix
infinity, so we fix 4 (in fact 5): */
if (flags & 1) {
- savestack_ix += 5; /* Protect save in progress. */
- o_save_i = savestack_ix;
+ PL_savestack_ix += 5; /* Protect save in progress. */
+ o_save_i = PL_savestack_ix;
SAVEDESTRUCTOR(unwind_handler_stack, (void*)&flags);
}
if (flags & 4)
- markstack_ptr++; /* Protect mark. */
+ PL_markstack_ptr++; /* Protect mark. */
if (flags & 8) {
- retstack_ix++;
- retstack[retstack_ix] = NULL;
+ PL_retstack_ix++;
+ PL_retstack[PL_retstack_ix] = NULL;
}
if (flags & 16)
- scopestack_ix += 1;
+ PL_scopestack_ix += 1;
/* sv_2cv is too complicated, try a simpler variant first: */
if (!SvROK(psig_ptr[sig]) || !(cv = (CV*)SvRV(psig_ptr[sig]))
|| SvTYPE(cv) != SVt_PVCV)
cv = sv_2cv(psig_ptr[sig],&st,&gv,TRUE);
if (!cv || !CvROOT(cv)) {
- if (dowarn)
+ if (PL_dowarn)
warn("SIG%s handler \"%s\" not defined.\n",
sig_name[sig], (gv ? GvENAME(gv)
: ((cv && CvGV(cv))
POPSTACK;
cleanup:
if (flags & 1)
- savestack_ix -= 8; /* Unprotect save in progress. */
+ PL_savestack_ix -= 8; /* Unprotect save in progress. */
if (flags & 4)
- markstack_ptr--;
+ PL_markstack_ptr--;
if (flags & 8)
- retstack_ix--;
+ PL_retstack_ix--;
if (flags & 16)
- scopestack_ix -= 1;
+ PL_scopestack_ix -= 1;
if (flags & 64)
SvREFCNT_dec(sv);
op = myop; /* Apparently not needed... */
- Sv = tSv; /* Restore global temporaries. */
- Xpv = tXpv;
+ PL_Sv = tSv; /* Restore global temporaries. */
+ PL_Xpv = tXpv;
return;
}
perl_init_i18nl10n(1);
- if (!do_undump) {
+ if (!PL_do_undump) {
my_perl = perl_alloc();
if (!my_perl)
exit(1);
perl_construct( my_perl );
- perl_destruct_level = 0;
+ PL_perl_destruct_level = 0;
}
exitstatus = perl_parse( my_perl, xs_init, argc, argv, (char **) NULL );
* think the expression is of the right type: croak actually does a Siglongjmp.
*/
#define CHECKOP(type,o) \
- ((op_mask && op_mask[type]) \
+ ((PL_op_mask && PL_op_mask[type]) \
? ( op_free((OP*)o), \
croak("%s trapped by operation mask", op_desc[type]), \
Nullop ) \
{
SV* tmpsv = sv_newmortal();
gv_efullname3(tmpsv, gv, Nullch);
- return SvPV(tmpsv,na);
+ return SvPV(tmpsv,PL_na);
}
STATIC OP *
SV *msg = sv_2mortal(
newSVpvf("(Did you mean $ or @ instead of %c?)\n",
type == OP_ENTERSUB ? '&' : '%'));
- if (in_eval & 2)
+ if (PL_in_eval & 2)
warn("%_", msg);
- else if (in_eval)
- sv_catsv(GvSV(errgv), msg);
+ else if (PL_in_eval)
+ sv_catsv(GvSV(PL_errgv), msg);
else
PerlIO_write(PerlIO_stderr(), SvPVX(msg), SvCUR(msg));
}
}
croak("Can't use global %s in \"my\"",name);
}
- if (dowarn && AvFILLp(comppad_name) >= 0) {
- SV **svp = AvARRAY(comppad_name);
- for (off = AvFILLp(comppad_name); off > comppad_name_floor; off--) {
+ if (PL_dowarn && AvFILLp(PL_comppad_name) >= 0) {
+ SV **svp = AvARRAY(PL_comppad_name);
+ for (off = AvFILLp(PL_comppad_name); off > PL_comppad_name_floor; off--) {
if ((sv = svp[off])
- && sv != &sv_undef
+ && sv != &PL_sv_undef
&& SvIVX(sv) == 999999999 /* var is in open scope */
&& strEQ(name, SvPVX(sv)))
{
sv = NEWSV(1102,0);
sv_upgrade(sv, SVt_PVNV);
sv_setpv(sv, name);
- if (in_my_stash) {
+ if (PL_in_my_stash) {
if (*name != '$')
croak("Can't declare class for non-scalar %s in \"my\"",name);
SvOBJECT_on(sv);
(void)SvUPGRADE(sv, SVt_PVMG);
- SvSTASH(sv) = (HV*)SvREFCNT_inc(in_my_stash);
- sv_objcount++;
+ SvSTASH(sv) = (HV*)SvREFCNT_inc(PL_in_my_stash);
+ PL_sv_objcount++;
}
- av_store(comppad_name, off, sv);
+ av_store(PL_comppad_name, off, sv);
SvNVX(sv) = (double)999999999;
SvIVX(sv) = 0; /* Not yet introduced--see newSTATEOP */
- if (!min_intro_pending)
- min_intro_pending = off;
- max_intro_pending = off;
+ if (!PL_min_intro_pending)
+ PL_min_intro_pending = off;
+ PL_max_intro_pending = off;
if (*name == '@')
- av_store(comppad, off, (SV*)newAV());
+ av_store(PL_comppad, off, (SV*)newAV());
else if (*name == '%')
- av_store(comppad, off, (SV*)newHV());
- SvPADMY_on(curpad[off]);
+ av_store(PL_comppad, off, (SV*)newHV());
+ SvPADMY_on(PL_curpad[off]);
return off;
}
SV **svp = av_fetch(curlist, 0, FALSE);
AV *curname;
- if (!svp || *svp == &sv_undef)
+ if (!svp || *svp == &PL_sv_undef)
continue;
curname = (AV*)*svp;
svp = AvARRAY(curname);
for (off = AvFILLp(curname); off > 0; off--) {
if ((sv = svp[off]) &&
- sv != &sv_undef &&
+ sv != &PL_sv_undef &&
seq <= SvIVX(sv) &&
seq > I_32(SvNVX(sv)) &&
strEQ(SvPVX(sv), name))
newoff = pad_alloc(OP_PADSV, SVs_PADMY);
sv_upgrade(namesv, SVt_PVNV);
sv_setpv(namesv, name);
- av_store(comppad_name, newoff, namesv);
- SvNVX(namesv) = (double)curcop->cop_seq;
+ av_store(PL_comppad_name, newoff, namesv);
+ SvNVX(namesv) = (double)PL_curcop->cop_seq;
SvIVX(namesv) = 999999999; /* A ref, intro immediately */
SvFAKE_on(namesv); /* A ref, not a real var */
- if (CvANON(compcv) || SvTYPE(compcv) == SVt_PVFM) {
+ if (CvANON(PL_compcv) || SvTYPE(PL_compcv) == SVt_PVFM) {
/* "It's closures all the way down." */
- CvCLONE_on(compcv);
+ CvCLONE_on(PL_compcv);
if (cv == startcv) {
- if (CvANON(compcv))
+ if (CvANON(PL_compcv))
oldsv = Nullsv; /* no need to keep ref */
}
else {
if (CvANON(bcv))
CvCLONE_on(bcv);
else {
- if (dowarn && !CvUNIQUE(cv))
+ if (PL_dowarn && !CvUNIQUE(cv))
warn(
"Variable \"%s\" may be unavailable",
name);
}
}
}
- else if (!CvUNIQUE(compcv)) {
- if (dowarn && !SvFAKE(sv) && !CvUNIQUE(cv))
+ else if (!CvUNIQUE(PL_compcv)) {
+ if (PL_dowarn && !SvFAKE(sv) && !CvUNIQUE(cv))
warn("Variable \"%s\" will not stay shared", name);
}
}
- av_store(comppad, newoff, SvREFCNT_inc(oldsv));
+ av_store(PL_comppad, newoff, SvREFCNT_inc(oldsv));
return newoff;
}
}
default:
if (i == 0 && saweval) {
seq = cxstack[saweval].blk_oldcop->cop_seq;
- return pad_findlex(name, newoff, seq, main_cv, 0);
+ return pad_findlex(name, newoff, seq, PL_main_cv, 0);
}
break;
case CXt_EVAL:
if (!saweval)
return 0;
cv = cx->blk_sub.cv;
- if (debstash && CvSTASH(cv) == debstash) { /* ignore DB'* scope */
+ if (PL_debstash && CvSTASH(cv) == PL_debstash) { /* ignore DB'* scope */
saweval = i; /* so we know where we were called from */
continue;
}
I32 off;
I32 pendoff = 0;
SV *sv;
- SV **svp = AvARRAY(comppad_name);
- U32 seq = cop_seqmax;
+ SV **svp = AvARRAY(PL_comppad_name);
+ U32 seq = PL_cop_seqmax;
#ifdef USE_THREADS
/*
#endif /* USE_THREADS */
/* The one we're looking for is probably just before comppad_name_fill. */
- for (off = AvFILLp(comppad_name); off > 0; off--) {
+ for (off = AvFILLp(PL_comppad_name); off > 0; off--) {
if ((sv = svp[off]) &&
- sv != &sv_undef &&
+ sv != &PL_sv_undef &&
(!SvIVX(sv) ||
(seq <= SvIVX(sv) &&
seq > I_32(SvNVX(sv)))) &&
}
/* See if it's in a nested scope */
- off = pad_findlex(name, 0, seq, CvOUTSIDE(compcv), cxstack_ix);
+ off = pad_findlex(name, 0, seq, CvOUTSIDE(PL_compcv), cxstack_ix);
if (off) {
/* If there is a pending local definition, this new alias must die */
if (pendoff)
- SvIVX(AvARRAY(comppad_name)[off]) = seq;
+ SvIVX(AvARRAY(PL_comppad_name)[off]) = seq;
return off; /* pad_findlex returns 0 for failure...*/
}
return NOT_IN_PAD; /* ...but we return NOT_IN_PAD for failure */
pad_leavemy(I32 fill)
{
I32 off;
- SV **svp = AvARRAY(comppad_name);
+ SV **svp = AvARRAY(PL_comppad_name);
SV *sv;
- if (min_intro_pending && fill < min_intro_pending) {
- for (off = max_intro_pending; off >= min_intro_pending; off--) {
- if ((sv = svp[off]) && sv != &sv_undef)
+ if (PL_min_intro_pending && fill < PL_min_intro_pending) {
+ for (off = PL_max_intro_pending; off >= PL_min_intro_pending; off--) {
+ if ((sv = svp[off]) && sv != &PL_sv_undef)
warn("%s never introduced", SvPVX(sv));
}
}
/* "Deintroduce" my variables that are leaving with this scope. */
- for (off = AvFILLp(comppad_name); off > fill; off--) {
- if ((sv = svp[off]) && sv != &sv_undef && SvIVX(sv) == 999999999)
- SvIVX(sv) = cop_seqmax;
+ for (off = AvFILLp(PL_comppad_name); off > fill; off--) {
+ if ((sv = svp[off]) && sv != &PL_sv_undef && SvIVX(sv) == 999999999)
+ SvIVX(sv) = PL_cop_seqmax;
}
}
SV *sv;
I32 retval;
- if (AvARRAY(comppad) != curpad)
+ if (AvARRAY(PL_comppad) != PL_curpad)
croak("panic: pad_alloc");
- if (pad_reset_pending)
+ if (PL_pad_reset_pending)
pad_reset();
if (tmptype & SVs_PADMY) {
do {
- sv = *av_fetch(comppad, AvFILLp(comppad) + 1, TRUE);
+ sv = *av_fetch(PL_comppad, AvFILLp(PL_comppad) + 1, TRUE);
} while (SvPADBUSY(sv)); /* need a fresh one */
- retval = AvFILLp(comppad);
+ retval = AvFILLp(PL_comppad);
}
else {
- SV **names = AvARRAY(comppad_name);
- SSize_t names_fill = AvFILLp(comppad_name);
+ SV **names = AvARRAY(PL_comppad_name);
+ SSize_t names_fill = AvFILLp(PL_comppad_name);
for (;;) {
/*
* "foreach" index vars temporarily become aliases to non-"my"
* values. Thus we must skip, not just pad values that are
* marked as current pad values, but also those with names.
*/
- if (++padix <= names_fill &&
- (sv = names[padix]) && sv != &sv_undef)
+ if (++PL_padix <= names_fill &&
+ (sv = names[PL_padix]) && sv != &PL_sv_undef)
continue;
- sv = *av_fetch(comppad, padix, TRUE);
+ sv = *av_fetch(PL_comppad, PL_padix, TRUE);
if (!(SvFLAGS(sv) & (SVs_PADTMP|SVs_PADMY)))
break;
}
- retval = padix;
+ retval = PL_padix;
}
SvFLAGS(sv) |= tmptype;
- curpad = AvARRAY(comppad);
+ PL_curpad = AvARRAY(PL_comppad);
#ifdef USE_THREADS
DEBUG_X(PerlIO_printf(Perl_debug_log, "0x%lx Pad 0x%lx alloc %ld for %s\n",
(unsigned long) thr, (unsigned long) curpad,
(long) retval, op_name[optype]));
#else
DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%lx alloc %ld for %s\n",
- (unsigned long) curpad,
+ (unsigned long) PL_curpad,
(long) retval, op_name[optype]));
#endif /* USE_THREADS */
return (PADOFFSET)retval;
if (!po)
croak("panic: pad_sv po");
DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%lx sv %d\n",
- (unsigned long) curpad, po));
+ (unsigned long) PL_curpad, po));
#endif /* USE_THREADS */
- return curpad[po]; /* eventually we'll turn this into a macro */
+ return PL_curpad[po]; /* eventually we'll turn this into a macro */
}
void
pad_free(PADOFFSET po)
{
dTHR;
- if (!curpad)
+ if (!PL_curpad)
return;
- if (AvARRAY(comppad) != curpad)
+ if (AvARRAY(PL_comppad) != PL_curpad)
croak("panic: pad_free curpad");
if (!po)
croak("panic: pad_free po");
(unsigned long) thr, (unsigned long) curpad, po));
#else
DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%lx free %d\n",
- (unsigned long) curpad, po));
+ (unsigned long) PL_curpad, po));
#endif /* USE_THREADS */
- if (curpad[po] && curpad[po] != &sv_undef)
- SvPADTMP_off(curpad[po]);
- if ((I32)po < padix)
- padix = po - 1;
+ if (PL_curpad[po] && PL_curpad[po] != &PL_sv_undef)
+ SvPADTMP_off(PL_curpad[po]);
+ if ((I32)po < PL_padix)
+ PL_padix = po - 1;
}
void
pad_swipe(PADOFFSET po)
{
dTHR;
- if (AvARRAY(comppad) != curpad)
+ if (AvARRAY(PL_comppad) != PL_curpad)
croak("panic: pad_swipe curpad");
if (!po)
croak("panic: pad_swipe po");
(unsigned long) thr, (unsigned long) curpad, po));
#else
DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%lx swipe %d\n",
- (unsigned long) curpad, po));
+ (unsigned long) PL_curpad, po));
#endif /* USE_THREADS */
- SvPADTMP_off(curpad[po]);
- curpad[po] = NEWSV(1107,0);
- SvPADTMP_on(curpad[po]);
- if ((I32)po < padix)
- padix = po - 1;
+ SvPADTMP_off(PL_curpad[po]);
+ PL_curpad[po] = NEWSV(1107,0);
+ SvPADTMP_on(PL_curpad[po]);
+ if ((I32)po < PL_padix)
+ PL_padix = po - 1;
}
/* XXX pad_reset() is currently disabled because it results in serious bugs.
padix = padix_floor;
}
#endif
- pad_reset_pending = FALSE;
+ PL_pad_reset_pending = FALSE;
}
#ifdef USE_THREADS
STATIC OP *
scalarboolean(OP *o)
{
- if (dowarn &&
+ if (PL_dowarn &&
o->op_type == OP_SASSIGN && cBINOPo->op_first->op_type == OP_CONST) {
dTHR;
- line_t oldline = curcop->cop_line;
+ line_t oldline = PL_curcop->cop_line;
- if (copline != NOLINE)
- curcop->cop_line = copline;
+ if (PL_copline != NOLINE)
+ PL_curcop->cop_line = PL_copline;
warn("Found = in conditional, should be ==");
- curcop->cop_line = oldline;
+ PL_curcop->cop_line = oldline;
}
return scalar(o);
}
OP *kid;
/* assumes no premature commitment */
- if (!o || (o->op_flags & OPf_WANT) || error_count
+ if (!o || (o->op_flags & OPf_WANT) || PL_error_count
|| o->op_type == OP_RETURN)
return o;
else
scalar(kid);
}
- WITH_THR(curcop = &compiling);
+ WITH_THR(PL_curcop = &PL_compiling);
break;
case OP_SCOPE:
case OP_LINESEQ:
else
scalar(kid);
}
- WITH_THR(curcop = &compiling);
+ WITH_THR(PL_curcop = &PL_compiling);
break;
}
return o;
SV* sv;
/* assumes no premature commitment */
- if (!o || (o->op_flags & OPf_WANT) == OPf_WANT_LIST || error_count
+ if (!o || (o->op_flags & OPf_WANT) == OPf_WANT_LIST || PL_error_count
|| o->op_type == OP_RETURN)
return o;
case OP_NEXTSTATE:
case OP_DBSTATE:
- WITH_THR(curcop = ((COP*)o)); /* for warning below */
+ WITH_THR(PL_curcop = ((COP*)o)); /* for warning below */
break;
case OP_CONST:
sv = cSVOPo->op_sv;
- if (dowarn) {
+ if (PL_dowarn) {
useless = "a constant";
if (SvNIOK(sv) && (SvNV(sv) == 0.0 || SvNV(sv) == 1.0))
useless = 0;
case OP_NULL:
if (o->op_targ == OP_NEXTSTATE || o->op_targ == OP_DBSTATE)
- WITH_THR(curcop = ((COP*)o)); /* for warning below */
+ WITH_THR(PL_curcop = ((COP*)o)); /* for warning below */
if (o->op_flags & OPf_STACKED)
break;
/* FALL THROUGH */
}
break;
}
- if (useless && dowarn)
+ if (useless && PL_dowarn)
warn("Useless use of %s in void context", useless);
return o;
}
OP *kid;
/* assumes no premature commitment */
- if (!o || (o->op_flags & OPf_WANT) || error_count
+ if (!o || (o->op_flags & OPf_WANT) || PL_error_count
|| o->op_type == OP_RETURN)
return o;
else
list(kid);
}
- WITH_THR(curcop = &compiling);
+ WITH_THR(PL_curcop = &PL_compiling);
break;
case OP_SCOPE:
case OP_LINESEQ:
else
list(kid);
}
- WITH_THR(curcop = &compiling);
+ WITH_THR(PL_curcop = &PL_compiling);
break;
case OP_REQUIRE:
/* all requires must return a boolean value */
scalarvoid(kid);
}
}
- curcop = &compiling;
+ PL_curcop = &PL_compiling;
}
o->op_flags &= ~OPf_PARENS;
- if (hints & HINT_BLOCK_SCOPE)
+ if (PL_hints & HINT_BLOCK_SCOPE)
o->op_flags |= OPf_PARENS;
}
else
OP *kid;
SV *sv;
- if (!o || error_count)
+ if (!o || PL_error_count)
return o;
switch (o->op_type) {
case OP_UNDEF:
- modcount++;
+ PL_modcount++;
return o;
case OP_CONST:
if (!(o->op_private & (OPpCONST_ARYBASE)))
goto nomod;
- if (eval_start && eval_start->op_type == OP_CONST) {
- compiling.cop_arybase = (I32)SvIV(((SVOP*)eval_start)->op_sv);
- eval_start = 0;
+ if (PL_eval_start && PL_eval_start->op_type == OP_CONST) {
+ PL_compiling.cop_arybase = (I32)SvIV(((SVOP*)PL_eval_start)->op_sv);
+ PL_eval_start = 0;
}
else if (!type) {
- SAVEI32(compiling.cop_arybase);
- compiling.cop_arybase = 0;
+ SAVEI32(PL_compiling.cop_arybase);
+ PL_compiling.cop_arybase = 0;
}
else if (type == OP_REFGEN)
goto nomod;
case OP_I_SUBTRACT:
if (!(o->op_flags & OPf_STACKED))
goto nomod;
- modcount++;
+ PL_modcount++;
break;
case OP_COND_EXPR:
if (!type && cUNOPo->op_first->op_type != OP_GV)
croak("Can't localize through a reference");
if (type == OP_REFGEN && o->op_flags & OPf_PARENS) {
- modcount = 10000;
+ PL_modcount = 10000;
return o; /* Treat \(@foo) like ordinary list. */
}
/* FALL THROUGH */
case OP_DBSTATE:
case OP_REFGEN:
case OP_CHOMP:
- modcount = 10000;
+ PL_modcount = 10000;
break;
case OP_RV2SV:
if (!type && cUNOPo->op_first->op_type != OP_GV)
/* FALL THROUGH */
case OP_GV:
case OP_AV2ARYLEN:
- hints |= HINT_BLOCK_SCOPE;
+ PL_hints |= HINT_BLOCK_SCOPE;
case OP_SASSIGN:
case OP_AELEMFAST:
- modcount++;
+ PL_modcount++;
break;
case OP_PADAV:
case OP_PADHV:
- modcount = 10000;
+ PL_modcount = 10000;
if (type == OP_REFGEN && o->op_flags & OPf_PARENS)
return o; /* Treat \(@foo) like ordinary list. */
if (scalar_mod_type(o, type))
goto nomod;
/* FALL THROUGH */
case OP_PADSV:
- modcount++;
+ PL_modcount++;
if (!type)
croak("Can't localize lexical variable %s",
- SvPV(*av_fetch(comppad_name, o->op_targ, 4), na));
+ SvPV(*av_fetch(PL_comppad_name, o->op_targ, 4), PL_na));
break;
#ifdef USE_THREADS
if (type == OP_ENTERSUB &&
!(o->op_private & (OPpLVAL_INTRO | OPpDEREF)))
o->op_private |= OPpLVAL_DEFER;
- modcount++;
+ PL_modcount++;
break;
case OP_SCOPE:
else if (!type) {
o->op_private |= OPpLVAL_INTRO;
o->op_flags &= ~OPf_SPECIAL;
- hints |= HINT_BLOCK_SCOPE;
+ PL_hints |= HINT_BLOCK_SCOPE;
}
else if (type != OP_GREPSTART && type != OP_ENTERSUB)
o->op_flags |= OPf_REF;
{
OP *kid;
- if (!o || error_count)
+ if (!o || PL_error_count)
return o;
switch (o->op_type) {
OP *kid;
I32 type;
- if (!o || error_count)
+ if (!o || PL_error_count)
return o;
type = o->op_type;
{
OP *o;
- if (dowarn &&
+ if (PL_dowarn &&
(left->op_type == OP_RV2AV ||
left->op_type == OP_RV2HV ||
left->op_type == OP_PADAV ||
scope(OP *o)
{
if (o) {
- if (o->op_flags & OPf_PARENS || PERLDB_NOOPT || tainting) {
+ if (o->op_flags & OPf_PARENS || PERLDB_NOOPT || PL_tainting) {
o = prepend_elem(OP_LINESEQ, newOP(OP_ENTER, 0), o);
o->op_type = OP_LEAVE;
o->op_ppaddr = ppaddr[OP_LEAVE];
void
save_hints(void)
{
- SAVEI32(hints);
- SAVESPTR(GvHV(hintgv));
- GvHV(hintgv) = newHVhv(GvHV(hintgv));
- SAVEFREESV(GvHV(hintgv));
+ SAVEI32(PL_hints);
+ SAVESPTR(GvHV(PL_hintgv));
+ GvHV(PL_hintgv) = newHVhv(GvHV(PL_hintgv));
+ SAVEFREESV(GvHV(PL_hintgv));
}
int
block_start(int full)
{
dTHR;
- int retval = savestack_ix;
+ int retval = PL_savestack_ix;
- SAVEI32(comppad_name_floor);
+ SAVEI32(PL_comppad_name_floor);
if (full) {
- if ((comppad_name_fill = AvFILLp(comppad_name)) > 0)
- comppad_name_floor = comppad_name_fill;
+ if ((PL_comppad_name_fill = AvFILLp(PL_comppad_name)) > 0)
+ PL_comppad_name_floor = PL_comppad_name_fill;
else
- comppad_name_floor = 0;
- }
- SAVEI32(min_intro_pending);
- SAVEI32(max_intro_pending);
- min_intro_pending = 0;
- SAVEI32(comppad_name_fill);
- SAVEI32(padix_floor);
- padix_floor = padix;
- pad_reset_pending = FALSE;
+ PL_comppad_name_floor = 0;
+ }
+ SAVEI32(PL_min_intro_pending);
+ SAVEI32(PL_max_intro_pending);
+ PL_min_intro_pending = 0;
+ SAVEI32(PL_comppad_name_fill);
+ SAVEI32(PL_padix_floor);
+ PL_padix_floor = PL_padix;
+ PL_pad_reset_pending = FALSE;
SAVEHINTS();
- hints &= ~HINT_BLOCK_SCOPE;
+ PL_hints &= ~HINT_BLOCK_SCOPE;
return retval;
}
block_end(I32 floor, OP *seq)
{
dTHR;
- int needblockscope = hints & HINT_BLOCK_SCOPE;
+ int needblockscope = PL_hints & HINT_BLOCK_SCOPE;
OP* retval = scalarseq(seq);
LEAVE_SCOPE(floor);
- pad_reset_pending = FALSE;
+ PL_pad_reset_pending = FALSE;
if (needblockscope)
- hints |= HINT_BLOCK_SCOPE; /* propagate out */
- pad_leavemy(comppad_name_fill);
- cop_seqmax++;
+ PL_hints |= HINT_BLOCK_SCOPE; /* propagate out */
+ pad_leavemy(PL_comppad_name_fill);
+ PL_cop_seqmax++;
return retval;
}
o->op_targ = find_threadsv("_");
return o;
#else
- return newSVREF(newGVOP(OP_GV, 0, defgv));
+ return newSVREF(newGVOP(OP_GV, 0, PL_defgv));
#endif /* USE_THREADS */
}
newPROG(OP *o)
{
dTHR;
- if (in_eval) {
- eval_root = newUNOP(OP_LEAVEEVAL, ((in_eval & 4) ? OPf_SPECIAL : 0), o);
- eval_start = linklist(eval_root);
- eval_root->op_next = 0;
- peep(eval_start);
+ if (PL_in_eval) {
+ PL_eval_root = newUNOP(OP_LEAVEEVAL, ((PL_in_eval & 4) ? OPf_SPECIAL : 0), o);
+ PL_eval_start = linklist(PL_eval_root);
+ PL_eval_root->op_next = 0;
+ peep(PL_eval_start);
}
else {
if (!o)
return;
- main_root = scope(sawparens(scalarvoid(o)));
- curcop = &compiling;
- main_start = LINKLIST(main_root);
- main_root->op_next = 0;
- peep(main_start);
- compcv = 0;
+ PL_main_root = scope(sawparens(scalarvoid(o)));
+ PL_curcop = &PL_compiling;
+ PL_main_start = LINKLIST(PL_main_root);
+ PL_main_root->op_next = 0;
+ peep(PL_main_start);
+ PL_compcv = 0;
/* Register with debugger */
if (PERLDB_INTER) {
if (cv) {
dSP;
PUSHMARK(SP);
- XPUSHs((SV*)compiling.cop_filegv);
+ XPUSHs((SV*)PL_compiling.cop_filegv);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
}
if (o->op_flags & OPf_PARENS)
list(o);
else {
- if (dowarn && bufptr > oldbufptr && bufptr[-1] == ',') {
+ if (PL_dowarn && PL_bufptr > PL_oldbufptr && PL_bufptr[-1] == ',') {
char *s;
- for (s = bufptr; *s && (isALNUM(*s) || strchr("@$%, ",*s)); s++) ;
+ for (s = PL_bufptr; *s && (isALNUM(*s) || strchr("@$%, ",*s)); s++) ;
if (*s == ';' || *s == '=')
warn("Parens missing around \"%s\" list", lex ? "my" : "local");
}
}
- in_my = FALSE;
- in_my_stash = Nullhv;
+ PL_in_my = FALSE;
+ PL_in_my_stash = Nullhv;
if (lex)
return my(o);
else
if (opargs[type] & OA_TARGET)
o->op_targ = pad_alloc(type, SVs_PADTMP);
- if ((opargs[type] & OA_OTHERINT) && (hints & HINT_INTEGER))
+ if ((opargs[type] & OA_OTHERINT) && (PL_hints & HINT_INTEGER))
o->op_ppaddr = ppaddr[type = ++(o->op_type)];
if (!(opargs[type] & OA_FOLDCONST))
goto nope;
}
- if (error_count)
+ if (PL_error_count)
goto nope; /* Don't try to run w/ errors */
for (curop = LINKLIST(o); curop != o; curop = LINKLIST(curop)) {
o->op_next = 0;
op = curop;
CALLRUNOPS();
- sv = *(stack_sp--);
+ sv = *(PL_stack_sp--);
if (o->op_targ && sv == PAD_SV(o->op_targ)) /* grab pad temp? */
pad_swipe(o->op_targ);
else if (SvTEMP(sv)) { /* grab mortal temp? */
if (!(opargs[type] & OA_OTHERINT))
return o;
- if (!(hints & HINT_INTEGER)) {
+ if (!(PL_hints & HINT_INTEGER)) {
if (type == OP_DIVIDE || !(o->op_flags & OPf_KIDS))
return o;
{
dTHR;
register OP *curop;
- I32 oldtmps_floor = tmps_floor;
+ I32 oldtmps_floor = PL_tmps_floor;
list(o);
- if (error_count)
+ if (PL_error_count)
return o; /* Don't attempt to run with errors */
op = curop = LINKLIST(o);
CALLRUNOPS();
op = curop;
pp_anonlist(ARGS);
- tmps_floor = oldtmps_floor;
+ PL_tmps_floor = oldtmps_floor;
o->op_type = OP_RV2AV;
o->op_ppaddr = ppaddr[OP_RV2AV];
curop = ((UNOP*)o)->op_first;
- ((UNOP*)o)->op_first = newSVOP(OP_CONST, 0, SvREFCNT_inc(*stack_sp--));
+ ((UNOP*)o)->op_first = newSVOP(OP_CONST, 0, SvREFCNT_inc(*PL_stack_sp--));
op_free(curop);
linklist(o);
return list(o);
pmop->op_flags = flags;
pmop->op_private = 0 | (flags >> 8);
- if (hints & HINT_RE_TAINT)
+ if (PL_hints & HINT_RE_TAINT)
pmop->op_pmpermflags |= PMf_RETAINT;
- if (hints & HINT_LOCALE)
+ if (PL_hints & HINT_LOCALE)
pmop->op_pmpermflags |= PMf_LOCALE;
pmop->op_pmflags = pmop->op_pmpermflags;
/* link into pm list */
- if (type != OP_TRANS && curstash) {
- pmop->op_pmnext = HvPMROOT(curstash);
- HvPMROOT(curstash) = pmop;
+ if (type != OP_TRANS && PL_curstash) {
+ pmop->op_pmnext = HvPMROOT(PL_curstash);
+ HvPMROOT(PL_curstash) = pmop;
}
return (OP*)pmop;
if (o->op_type == OP_TRANS)
return pmtrans(o, expr, repl);
- hints |= HINT_BLOCK_SCOPE;
+ PL_hints |= HINT_BLOCK_SCOPE;
pm = (PMOP*)o;
if (expr->op_type == OP_CONST) {
op_free(expr);
}
else {
- if (pm->op_pmflags & PMf_KEEP || !(hints & HINT_RE_EVAL))
- expr = newUNOP((!(hints & HINT_RE_EVAL)
+ if (pm->op_pmflags & PMf_KEEP || !(PL_hints & HINT_RE_EVAL))
+ expr = newUNOP((!(PL_hints & HINT_RE_EVAL)
? OP_REGCRESET
: OP_REGCMAYBE),0,expr);
rcop->op_type = OP_REGCOMP;
rcop->op_ppaddr = ppaddr[OP_REGCOMP];
rcop->op_first = scalar(expr);
- rcop->op_flags |= ((hints & HINT_RE_EVAL)
+ rcop->op_flags |= ((PL_hints & HINT_RE_EVAL)
? (OPf_SPECIAL | OPf_KIDS)
: OPf_KIDS);
rcop->op_private = 1;
rcop->op_other = o;
/* establish postfix order */
- if (pm->op_pmflags & PMf_KEEP || !(hints & HINT_RE_EVAL)) {
+ if (pm->op_pmflags & PMf_KEEP || !(PL_hints & HINT_RE_EVAL)) {
LINKLIST(expr);
rcop->op_next = expr;
((UNOP*)expr)->op_first->op_next = (OP*)rcop;
dTHR;
SV *sv;
- save_hptr(&curstash);
- save_item(curstname);
+ save_hptr(&PL_curstash);
+ save_item(PL_curstname);
if (o) {
STRLEN len;
char *name;
sv = cSVOPo->op_sv;
name = SvPV(sv, len);
- curstash = gv_stashpvn(name,len,TRUE);
- sv_setpvn(curstname, name, len);
+ PL_curstash = gv_stashpvn(name,len,TRUE);
+ sv_setpvn(PL_curstname, name, len);
op_free(o);
}
else {
- sv_setpv(curstname,"<none>");
- curstash = Nullhv;
+ sv_setpv(PL_curstname,"<none>");
+ PL_curstash = Nullhv;
}
- copline = NOLINE;
- expect = XSTATE;
+ PL_copline = NOLINE;
+ PL_expect = XSTATE;
}
void
newSTATEOP(0, Nullch, veop)),
newSTATEOP(0, Nullch, imop) ));
- copline = NOLINE;
- expect = XSTATE;
+ PL_copline = NOLINE;
+ PL_expect = XSTATE;
}
OP *
if (list_assignment(left)) {
dTHR;
- modcount = 0;
- eval_start = right; /* Grandfathering $[ assignment here. Bletch.*/
+ PL_modcount = 0;
+ PL_eval_start = right; /* Grandfathering $[ assignment here. Bletch.*/
left = mod(left, OP_AASSIGN);
- if (eval_start)
- eval_start = 0;
+ if (PL_eval_start)
+ PL_eval_start = 0;
else {
op_free(left);
op_free(right);
if (!(left->op_private & OPpLVAL_INTRO)) {
OP *curop;
OP *lastop = o;
- generation++;
+ PL_generation++;
for (curop = LINKLIST(o); curop != o; curop = LINKLIST(curop)) {
if (opargs[curop->op_type] & OA_DANGEROUS) {
if (curop->op_type == OP_GV) {
GV *gv = ((GVOP*)curop)->op_gv;
- if (gv == defgv || SvCUR(gv) == generation)
+ if (gv == PL_defgv || SvCUR(gv) == PL_generation)
break;
- SvCUR(gv) = generation;
+ SvCUR(gv) = PL_generation;
}
else if (curop->op_type == OP_PADSV ||
cu