diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2001-06-27 09:21:27 +0530 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-02 13:25:40 +0000 |
commit | 7fb3795116dd07b7f236652a03ac53946b1af7cf (patch) | |
tree | ddf0f84c3ced4f193c2e9b22e9372710806cd305 | |
parent | fd90a50dd9dd98650b54e33f8b9a3e77bcbf54b8 (diff) | |
download | perl-7fb3795116dd07b7f236652a03ac53946b1af7cf.tar.gz |
Re: [PATH] shared -> unique;
Message-ID: <20010627035127.A17623@lustre.lustre.dyn.wiw.org>
p4raw-id: //depot/perl@11089
-rw-r--r-- | dump.c | 2 | ||||
-rw-r--r-- | gv.c | 6 | ||||
-rw-r--r-- | gv.h | 12 | ||||
-rw-r--r-- | op.c | 18 | ||||
-rw-r--r-- | pp_sys.c | 6 | ||||
-rw-r--r-- | sv.c | 16 | ||||
-rw-r--r-- | toke.c | 2 | ||||
-rw-r--r-- | xsutils.c | 8 |
8 files changed, 35 insertions, 35 deletions
@@ -960,7 +960,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo case SVt_PVGV: if (GvINTRO(sv)) sv_catpv(d, "INTRO,"); if (GvMULTI(sv)) sv_catpv(d, "MULTI,"); - if (GvSHARED(sv)) sv_catpv(d, "SHARED,"); + if (GvUNIQUE(sv)) sv_catpv(d, "UNIQUE,"); if (GvASSUMECV(sv)) sv_catpv(d, "ASSUMECV,"); if (GvIN_PAD(sv)) sv_catpv(d, "IN_PAD,"); if (flags & SVpad_OUR) sv_catpv(d, "OUR,"); @@ -46,9 +46,9 @@ Perl_gv_IOadd(pTHX_ register GV *gv) if (!gv || SvTYPE((SV*)gv) != SVt_PVGV) Perl_croak(aTHX_ "Bad symbol for filehandle"); if (!GvIOp(gv)) { -#ifdef GV_SHARED_CHECK - if (GvSHARED(gv)) { - Perl_croak(aTHX_ "Bad symbol for filehandle (GV is shared)"); +#ifdef GV_UNIQUE_CHECK + if (GvUNIQUE(gv)) { + Perl_croak(aTHX_ "Bad symbol for filehandle (GV is unique)"); } #endif GvIOp(gv) = newIO(); @@ -133,15 +133,15 @@ HV *GvHVn(); /* XXX: all GvFLAGS options are used, borrowing GvGPFLAGS for the moment */ -#define GVf_SHARED 0x0001 -#define GvSHARED(gv) (GvGP(gv) && (GvGPFLAGS(gv) & GVf_SHARED)) -#define GvSHARED_on(gv) (GvGPFLAGS(gv) |= GVf_SHARED) -#define GvSHARED_off(gv) (GvGPFLAGS(gv) &= ~GVf_SHARED) +#define GVf_UNIQUE 0x0001 +#define GvUNIQUE(gv) (GvGP(gv) && (GvGPFLAGS(gv) & GVf_UNIQUE)) +#define GvUNIQUE_on(gv) (GvGPFLAGS(gv) |= GVf_UNIQUE) +#define GvUNIQUE_off(gv) (GvGPFLAGS(gv) &= ~GVf_UNIQUE) #ifdef USE_ITHREADS -#define GV_SHARED_CHECK +#define GV_UNIQUE_CHECK #else -#undef GV_SHARED_CHECK +#undef GV_UNIQUE_CHECK #endif #define Nullgv Null(GV*) @@ -4598,9 +4598,9 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) cv = (!name || GvCVGEN(gv)) ? Nullcv : GvCV(gv); -#ifdef GV_SHARED_CHECK - if (cv && GvSHARED(gv) && SvREADONLY(cv)) { - Perl_croak(aTHX_ "Can't define subroutine %s (GV is shared)", name); +#ifdef GV_UNIQUE_CHECK + if (cv && GvUNIQUE(gv) && SvREADONLY(cv)) { + Perl_croak(aTHX_ "Can't define subroutine %s (GV is unique)", name); } #endif @@ -4612,9 +4612,9 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (cv) { bool exists = CvROOT(cv) || CvXSUB(cv); -#ifdef GV_SHARED_CHECK - if (exists && GvSHARED(gv)) { - Perl_croak(aTHX_ "Can't redefine shared subroutine %s", name); +#ifdef GV_UNIQUE_CHECK + if (exists && GvUNIQUE(gv)) { + Perl_croak(aTHX_ "Can't redefine unique subroutine %s", name); } #endif @@ -5102,9 +5102,9 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) else name = "STDOUT"; gv = gv_fetchpv(name,TRUE, SVt_PVFM); -#ifdef GV_SHARED_CHECK - if (GvSHARED(gv)) { - Perl_croak(aTHX_ "Bad symbol for form (GV is shared)"); +#ifdef GV_UNIQUE_CHECK + if (GvUNIQUE(gv)) { + Perl_croak(aTHX_ "Bad symbol for form (GV is unique)"); } #endif GvMULTI_on(gv); @@ -758,9 +758,9 @@ PP(pp_tie) methname = "TIEARRAY"; break; case SVt_PVGV: -#ifdef GV_SHARED_CHECK - if (GvSHARED((GV*)varsv)) { - Perl_croak(aTHX_ "Attempt to tie shared GV"); +#ifdef GV_UNIQUE_CHECK + if (GvUNIQUE((GV*)varsv)) { + Perl_croak(aTHX_ "Attempt to tie unique GV"); } #endif methname = "TIEHANDLE"; @@ -3613,8 +3613,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) Perl_croak(aTHX_ "Can't redefine active sort subroutine %s", GvNAME(dstr)); -#ifdef GV_SHARED_CHECK - if (GvSHARED((GV*)dstr)) { +#ifdef GV_UNIQUE_CHECK + if (GvUNIQUE((GV*)dstr)) { Perl_croak(aTHX_ PL_no_modify); } #endif @@ -3659,8 +3659,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) SV *dref = 0; int intro = GvINTRO(dstr); -#ifdef GV_SHARED_CHECK - if (GvSHARED((GV*)dstr)) { +#ifdef GV_UNIQUE_CHECK + if (GvUNIQUE((GV*)dstr)) { Perl_croak(aTHX_ PL_no_modify); } #endif @@ -8636,7 +8636,7 @@ S_gv_share(pTHX_ SV *sstr) SV *sv = &PL_sv_no; /* just need SvREADONLY-ness */ if (GvIO(gv) || GvFORM(gv)) { - GvSHARED_off(gv); /* GvIOs cannot be shared. nor can GvFORMs */ + GvUNIQUE_off(gv); /* GvIOs cannot be shared. nor can GvFORMs */ } else if (!GvCV(gv)) { GvCV(gv) = (CV*)sv; @@ -8644,11 +8644,11 @@ S_gv_share(pTHX_ SV *sstr) else { /* CvPADLISTs cannot be shared */ if (!CvXSUB(GvCV(gv))) { - GvSHARED_off(gv); + GvUNIQUE_off(gv); } } - if (!GvSHARED(gv)) { + if (!GvUNIQUE(gv)) { #if 0 PerlIO_printf(Perl_debug_log, "gv_share: unable to share %s::%s\n", HvNAME(GvSTASH(gv)), GvNAME(gv)); @@ -8832,7 +8832,7 @@ Perl_sv_dup(pTHX_ SV *sstr, clone_params* param) LvTYPE(dstr) = LvTYPE(sstr); break; case SVt_PVGV: - if (GvSHARED((GV*)sstr)) { + if (GvUNIQUE((GV*)sstr)) { SV *share; if ((share = gv_share(sstr))) { del_SV(dstr); @@ -3092,7 +3092,7 @@ Perl_yylex(pTHX) CvMETHOD_on(PL_compcv); #ifdef USE_ITHREADS else if (PL_in_my == KEY_our && len == 6 && strnEQ(s, "unique", len)) - GvSHARED_on(cGVOPx_gv(yylval.opval)); + GvUNIQUE_on(cGVOPx_gv(yylval.opval)); #endif /* After we've set the flags, it could be argued that we don't need to do the attributes.pm-based setting @@ -87,9 +87,9 @@ modify_SV_attributes(pTHXo_ SV *sv, SV **retlist, SV **attrlist, int numattrs) case 's': if (strEQ(name, "unique")) { if (negated) - GvSHARED_off(CvGV((CV*)sv)); + GvUNIQUE_off(CvGV((CV*)sv)); else - GvSHARED_on(CvGV((CV*)sv)); + GvUNIQUE_on(CvGV((CV*)sv)); continue; } break; @@ -103,7 +103,7 @@ modify_SV_attributes(pTHXo_ SV *sv, SV **retlist, SV **attrlist, int numattrs) switch (*name) { case 's': if (strEQ(name, "unique")) { - /* toke.c has already marked as GvSHARED */ + /* toke.c has already marked as GVf_UNIQUE */ continue; } } @@ -189,7 +189,7 @@ usage: #endif if (cvflags & CVf_METHOD) XPUSHs(sv_2mortal(newSVpvn("method", 6))); - if (GvSHARED(CvGV((CV*)sv))) + if (GvUNIQUE(CvGV((CV*)sv))) XPUSHs(sv_2mortal(newSVpvn("unique", 6))); break; default: |