From: Gurusamy Sarathy Date: Mon, 6 Jul 1998 19:23:06 +0000 (+0000) Subject: rename s/\bSI_/PERLSI_/ to avoid collisions with sysinfo headers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e788e7d35b1f8979a002a1e994535be7aae30018;p=p5sagit%2Fp5-mst-13.2.git rename s/\bSI_/PERLSI_/ to avoid collisions with sysinfo headers p4raw-id: //depot/perl@1339 --- diff --git a/av.c b/av.c index b69dcf2..5aac5b1 100644 --- a/av.c +++ b/av.c @@ -53,7 +53,7 @@ av_extend(AV *av, I32 key) dSP; ENTER; SAVETMPS; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); EXTEND(SP,2); PUSHs(mg->mg_obj); @@ -399,7 +399,7 @@ av_push(register AV *av, SV *val) 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); @@ -426,7 +426,7 @@ av_pop(register AV *av) 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; @@ -461,7 +461,7 @@ av_unshift(register AV *av, register I32 num) 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); @@ -512,7 +512,7 @@ av_shift(register AV *av) 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; @@ -555,7 +555,7 @@ av_fill(register AV *av, I32 fill) dSP; ENTER; SAVETMPS; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); EXTEND(SP,2); PUSHs(mg->mg_obj); diff --git a/cop.h b/cop.h index 478bfd4..644f456 100644 --- a/cop.h +++ b/cop.h @@ -292,17 +292,17 @@ struct context { * 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 */ @@ -345,7 +345,7 @@ typedef struct stackinfo PERL_SI; SET_MARKBASE; \ } STMT_END -#define PUSHSTACK PUSHSTACKi(SI_UNKNOWN) +#define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN) #define POPSTACK \ STMT_START { \ diff --git a/gv.c b/gv.c index 035f22c..07c0b19 100644 --- a/gv.c +++ b/gv.c @@ -1356,7 +1356,7 @@ amagic_call(SV *left, SV *right, int method, int flags) myop.op_next = Nullop; myop.op_flags = OPf_WANT_SCALAR | OPf_STACKED; - PUSHSTACKi(SI_OVERLOAD); + PUSHSTACKi(PERLSI_OVERLOAD); ENTER; SAVEOP(); op = (OP *) &myop; diff --git a/mg.c b/mg.c index b3dde0e..2b96829 100644 --- a/mg.c +++ b/mg.c @@ -981,7 +981,7 @@ magic_methpack(SV *sv, MAGIC *mg, char *meth) ENTER; SAVETMPS; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); if (magic_methcall(mg, meth, G_SCALAR, 2, NULL)) { sv_setsv(sv, *stack_sp--); @@ -1007,7 +1007,7 @@ magic_setpack(SV *sv, MAGIC *mg) { dSP; ENTER; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); magic_methcall(mg, "STORE", G_SCALAR|G_DISCARD, 3, sv); POPSTACK; LEAVE; @@ -1029,7 +1029,7 @@ magic_sizepack(SV *sv, MAGIC *mg) 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; @@ -1045,7 +1045,7 @@ int magic_wipepack(SV *sv, MAGIC *mg) dSP; ENTER; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); XPUSHs(mg->mg_obj); PUTBACK; @@ -1063,7 +1063,7 @@ magic_nextpack(SV *sv, MAGIC *mg, SV *key) ENTER; SAVETMPS; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); EXTEND(SP, 2); PUSHs(mg->mg_obj); @@ -1947,7 +1947,7 @@ sighandler(int sig) sv_setpv(sv,sig_name[sig]); } - PUSHSTACKi(SI_SIGNAL); + PUSHSTACKi(PERLSI_SIGNAL); PUSHMARK(SP); PUSHs(sv); PUTBACK; diff --git a/op.c b/op.c index eef23c1..f427b3b 100644 --- a/op.c +++ b/op.c @@ -3475,7 +3475,7 @@ newSUB(I32 floor, OP *o, OP *proto, OP *block) 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)); diff --git a/perl.c b/perl.c index 7202c87..dd48844 100644 --- a/perl.c +++ b/perl.c @@ -1443,7 +1443,7 @@ perl_require_pv(char *pv) { SV* sv; dSP; - PUSHSTACKi(SI_REQUIRE); + PUSHSTACKi(PERLSI_REQUIRE); PUTBACK; sv = sv_newmortal(); sv_setpv(sv, "require '"); @@ -2356,7 +2356,7 @@ init_stacks(ARGSproto) /* 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 */ diff --git a/pp_ctl.c b/pp_ctl.c index 96e852e..bdc371f 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -729,7 +729,7 @@ PP(pp_sort) 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); @@ -1471,7 +1471,7 @@ PP(pp_return) 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); diff --git a/pp_sys.c b/pp_sys.c index 6a4ad31..f3c5dd4 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -554,7 +554,7 @@ PP(pp_tie) items = SP - MARK++; if (sv_isobject(*MARK)) { ENTER; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); EXTEND(SP,items); while (items--) @@ -572,7 +572,7 @@ PP(pp_tie) methname, SvPV(*MARK,na)); } ENTER; - PUSHSTACKi(SI_MAGIC); + PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); EXTEND(SP,items); while (items--) diff --git a/scope.c b/scope.c index 985c650..548ebdc 100644 --- a/scope.c +++ b/scope.c @@ -57,7 +57,7 @@ new_stackinfo(I32 stitems, I32 cxitems) 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; } diff --git a/sv.c b/sv.c index 7f1350b..0ff19a2 100644 --- a/sv.c +++ b/sv.c @@ -2010,7 +2010,7 @@ sv_setsv(SV *dstr, register SV *sstr) 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)); @@ -2107,7 +2107,7 @@ sv_setsv(SV *dstr, register SV *sstr) 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", @@ -2799,7 +2799,7 @@ sv_clear(register SV *sv) 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); diff --git a/toke.c b/toke.c index 8d495f6..22fc267 100644 --- a/toke.c +++ b/toke.c @@ -4769,7 +4769,7 @@ new_constant(char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type) myop.op_next = Nullop; myop.op_flags = OPf_WANT_SCALAR | OPf_STACKED; - PUSHSTACKi(SI_OVERLOAD); + PUSHSTACKi(PERLSI_OVERLOAD); ENTER; SAVEOP(); op = (OP *) &myop; diff --git a/util.c b/util.c index 1ce9872..81c4fa8 100644 --- a/util.c +++ b/util.c @@ -1289,7 +1289,7 @@ die(const char* pat, ...) msg = ERRSV; } - PUSHSTACKi(SI_DIEHOOK); + PUSHSTACKi(PERLSI_DIEHOOK); PUSHMARK(SP); XPUSHs(msg); PUTBACK; @@ -1343,7 +1343,7 @@ croak(const char* pat, ...) SvREADONLY_on(msg); SAVEFREESV(msg); - PUSHSTACKi(SI_DIEHOOK); + PUSHSTACKi(PERLSI_DIEHOOK); PUSHMARK(SP); XPUSHs(msg); PUTBACK; @@ -1392,7 +1392,7 @@ warn(const char* pat,...) SvREADONLY_on(msg); SAVEFREESV(msg); - PUSHSTACKi(SI_WARNHOOK); + PUSHSTACKi(PERLSI_WARNHOOK); PUSHMARK(SP); XPUSHs(msg); PUTBACK;