dSP;
ENTER;
SAVETMPS;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(mg->mg_obj);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(mg->mg_obj);
croak(no_modify);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
XPUSHs(mg->mg_obj);
PUTBACK;
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,1+num);
PUSHs(mg->mg_obj);
croak(no_modify);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
XPUSHs(mg->mg_obj);
PUTBACK;
dSP;
ENTER;
SAVETMPS;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(mg->mg_obj);
* This ensures magic doesn't invalidate local stack and cx pointers.
*/
-#define SI_UNKNOWN -1
-#define SI_UNDEF 0
-#define SI_MAIN 1
-#define SI_MAGIC 2
-#define SI_SORT 3
-#define SI_SIGNAL 4
-#define SI_OVERLOAD 5
-#define SI_DESTROY 6
-#define SI_WARNHOOK 7
-#define SI_DIEHOOK 8
-#define SI_REQUIRE 9
+#define PERLSI_UNKNOWN -1
+#define PERLSI_UNDEF 0
+#define PERLSI_MAIN 1
+#define PERLSI_MAGIC 2
+#define PERLSI_SORT 3
+#define PERLSI_SIGNAL 4
+#define PERLSI_OVERLOAD 5
+#define PERLSI_DESTROY 6
+#define PERLSI_WARNHOOK 7
+#define PERLSI_DIEHOOK 8
+#define PERLSI_REQUIRE 9
struct stackinfo {
AV * si_stack; /* stack for current runlevel */
SET_MARKBASE; \
} STMT_END
-#define PUSHSTACK PUSHSTACKi(SI_UNKNOWN)
+#define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN)
#define POPSTACK \
STMT_START { \
myop.op_next = Nullop;
myop.op_flags = OPf_WANT_SCALAR | OPf_STACKED;
- PUSHSTACKi(SI_OVERLOAD);
+ PUSHSTACKi(PERLSI_OVERLOAD);
ENTER;
SAVEOP();
op = (OP *) &myop;
ENTER;
SAVETMPS;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
if (magic_methcall(mg, meth, G_SCALAR, 2, NULL)) {
sv_setsv(sv, *stack_sp--);
{
dSP;
ENTER;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
magic_methcall(mg, "STORE", G_SCALAR|G_DISCARD, 3, sv);
POPSTACK;
LEAVE;
ENTER;
SAVETMPS;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
if (magic_methcall(mg, "FETCHSIZE", G_SCALAR, 2, NULL)) {
sv = *stack_sp--;
retval = (U32) SvIV(sv)-1;
dSP;
ENTER;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
XPUSHs(mg->mg_obj);
PUTBACK;
ENTER;
SAVETMPS;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP, 2);
PUSHs(mg->mg_obj);
sv_setpv(sv,sig_name[sig]);
}
- PUSHSTACKi(SI_SIGNAL);
+ PUSHSTACKi(PERLSI_SIGNAL);
PUSHMARK(SP);
PUSHs(sv);
PUTBACK;
goto done;
}
/* ahem, death to those who redefine active sort subs */
- if (curstackinfo->si_type == SI_SORT && sortcop == CvSTART(cv))
+ if (curstackinfo->si_type == PERLSI_SORT && sortcop == CvSTART(cv))
croak("Can't redefine active sort subroutine %s", name);
if(const_sv = cv_const_sv(cv))
const_changed = sv_cmp(const_sv, op_const_sv(block, Nullcv));
{
SV* sv;
dSP;
- PUSHSTACKi(SI_REQUIRE);
+ PUSHSTACKi(PERLSI_REQUIRE);
PUTBACK;
sv = sv_newmortal();
sv_setpv(sv, "require '");
/* start with 128-item stack and 8K cxstack */
curstackinfo = new_stackinfo(REASONABLE(128),
REASONABLE(8192/sizeof(PERL_CONTEXT) - 1));
- curstackinfo->si_type = SI_MAIN;
+ curstackinfo->si_type = PERLSI_MAIN;
curstack = curstackinfo->si_stack;
mainstack = curstack; /* remember in case we switch stacks */
SAVEOP();
CATCH_SET(TRUE);
- PUSHSTACKi(SI_SORT);
+ PUSHSTACKi(PERLSI_SORT);
if (sortstash != stash) {
firstgv = gv_fetchpv("a", TRUE, SVt_PV);
secondgv = gv_fetchpv("b", TRUE, SVt_PV);
PMOP *newpm;
I32 optype = 0;
- if (curstackinfo->si_type == SI_SORT) {
+ if (curstackinfo->si_type == PERLSI_SORT) {
if (cxstack_ix == sortcxix || dopoptosub(cxstack_ix) <= sortcxix) {
if (cxstack_ix > sortcxix)
dounwind(sortcxix);
items = SP - MARK++;
if (sv_isobject(*MARK)) {
ENTER;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,items);
while (items--)
methname, SvPV(*MARK,na));
}
ENTER;
- PUSHSTACKi(SI_MAGIC);
+ PUSHSTACKi(PERLSI_MAGIC);
PUSHMARK(SP);
EXTEND(SP,items);
while (items--)
si->si_next = 0;
si->si_cxmax = cxitems - 1;
si->si_cxix = -1;
- si->si_type = SI_UNDEF;
+ si->si_type = PERLSI_UNDEF;
New(56, si->si_cxstack, cxitems, PERL_CONTEXT);
return si;
}
SvFAKE_on(dstr); /* can coerce to non-glob */
}
/* ahem, death to those who redefine active sort subs */
- else if (curstackinfo->si_type == SI_SORT
+ else if (curstackinfo->si_type == PERLSI_SORT
&& GvCV(dstr) && sortcop == CvSTART(GvCV(dstr)))
croak("Can't redefine active sort subroutine %s",
GvNAME(dstr));
Nullcv));
/* ahem, death to those who redefine
* active sort subs */
- if (curstackinfo->si_type == SI_SORT &&
+ if (curstackinfo->si_type == PERLSI_SORT &&
sortcop == CvSTART(cv))
croak(
"Can't redefine active sort subroutine %s",
destructor = gv_fetchmethod(SvSTASH(sv), "DESTROY");
if (destructor) {
ENTER;
- PUSHSTACKi(SI_DESTROY);
+ PUSHSTACKi(PERLSI_DESTROY);
SvRV(&tmpref) = SvREFCNT_inc(sv);
EXTEND(SP, 2);
PUSHMARK(SP);
myop.op_next = Nullop;
myop.op_flags = OPf_WANT_SCALAR | OPf_STACKED;
- PUSHSTACKi(SI_OVERLOAD);
+ PUSHSTACKi(PERLSI_OVERLOAD);
ENTER;
SAVEOP();
op = (OP *) &myop;
msg = ERRSV;
}
- PUSHSTACKi(SI_DIEHOOK);
+ PUSHSTACKi(PERLSI_DIEHOOK);
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHSTACKi(SI_DIEHOOK);
+ PUSHSTACKi(PERLSI_DIEHOOK);
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHSTACKi(SI_WARNHOOK);
+ PUSHSTACKi(PERLSI_WARNHOOK);
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;