diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-04-13 08:43:30 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-04-13 08:43:30 +0100 |
commit | d32faaf3b401b4c02872bfb2f57e48e11b3a1d28 (patch) | |
tree | 0b9f5c0f005c2be5689c9c7fc00fcd345cc426af | |
parent | 009f650f63e8acd928fc3a7bd09802d4edaadad9 (diff) | |
download | perl-d32faaf3b401b4c02872bfb2f57e48e11b3a1d28.tar.gz |
GvUNIQUE* have been defined as 0 since 2005/06/30 - high time to remove them.
-rw-r--r-- | dump.c | 1 | ||||
-rw-r--r-- | ext/attributes/attributes.xs | 6 | ||||
-rw-r--r-- | gv.c | 5 | ||||
-rw-r--r-- | gv.h | 10 | ||||
-rw-r--r-- | op.c | 17 | ||||
-rw-r--r-- | pp_sys.c | 5 | ||||
-rw-r--r-- | sv.c | 18 | ||||
-rw-r--r-- | toke.c | 5 |
8 files changed, 1 insertions, 66 deletions
@@ -1492,7 +1492,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo if (isGV_with_GP(sv)) { if (GvINTRO(sv)) sv_catpv(d, "INTRO,"); if (GvMULTI(sv)) sv_catpv(d, "MULTI,"); - if (GvUNIQUE(sv)) sv_catpv(d, "UNIQUE,"); if (GvASSUMECV(sv)) sv_catpv(d, "ASSUMECV,"); if (GvIN_PAD(sv)) sv_catpv(d, "IN_PAD,"); } diff --git a/ext/attributes/attributes.xs b/ext/attributes/attributes.xs index 7a86cd76c1..f7eb6e0505 100644 --- a/ext/attributes/attributes.xs +++ b/ext/attributes/attributes.xs @@ -131,12 +131,6 @@ usage: XPUSHs(newSVpvs_flags("lvalue", SVs_TEMP)); if (cvflags & CVf_METHOD) XPUSHs(newSVpvs_flags("method", SVs_TEMP)); - if (GvUNIQUE(CvGV((const CV *)sv))) - XPUSHs(newSVpvs_flags("unique", SVs_TEMP)); - break; - case SVt_PVGV: - if (isGV_with_GP(sv) && GvUNIQUE(sv)) - XPUSHs(newSVpvs_flags("unique", SVs_TEMP)); break; default: break; @@ -103,11 +103,6 @@ Perl_gv_IOadd(pTHX_ register GV *gv) } if (!GvIOp(gv)) { -#ifdef GV_UNIQUE_CHECK - if (GvUNIQUE(gv)) { - Perl_croak(aTHX_ "Bad symbol for filehandle (GV is unique)"); - } -#endif GvIOp(gv) = newIO(); } return gv; @@ -166,16 +166,6 @@ Return the SV from the GV. #define GvIN_PAD_on(gv) (GvFLAGS(gv) |= GVf_IN_PAD) #define GvIN_PAD_off(gv) (GvFLAGS(gv) &= ~GVf_IN_PAD) -#define GvUNIQUE(gv) 0 -#define GvUNIQUE_on(gv) NOOP -#define GvUNIQUE_off(gv) NOOP - -#ifdef USE_ITHREADS -#define GV_UNIQUE_CHECK -#else -#undef GV_UNIQUE_CHECK -#endif - #ifndef PERL_CORE # define Nullgv Null(GV*) #endif @@ -5588,12 +5588,6 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) cv = (!name || GvCVGEN(gv)) ? NULL : GvCV(gv); -#ifdef GV_UNIQUE_CHECK - if (cv && GvUNIQUE(gv) && SvREADONLY(cv)) { - Perl_croak(aTHX_ "Can't define subroutine %s (GV is unique)", name); - } -#endif - if (!block || !ps || *ps || attrs || (CvFLAGS(PL_compcv) & CVf_BUILTIN_ATTRS) #ifdef PERL_MAD @@ -5607,12 +5601,6 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (cv) { const bool exists = CvROOT(cv) || CvXSUB(cv); -#ifdef GV_UNIQUE_CHECK - if (exists && GvUNIQUE(gv)) { - Perl_croak(aTHX_ "Can't redefine unique subroutine %s", name); - } -#endif - /* if the subroutine doesn't exist and wasn't pre-declared * with a prototype, assume it will be AUTOLOADed, * skipping the prototype check @@ -6155,11 +6143,6 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) ? gv_fetchsv(cSVOPo->op_sv, GV_ADD, SVt_PVFM) : gv_fetchpvs("STDOUT", GV_ADD|GV_NOTQUAL, SVt_PVFM); -#ifdef GV_UNIQUE_CHECK - if (GvUNIQUE(gv)) { - Perl_croak(aTHX_ "Bad symbol for form (GV is unique)"); - } -#endif GvMULTI_on(gv); if ((cv = GvFORM(gv))) { if (ckWARN(WARN_REDEFINE)) { @@ -804,11 +804,6 @@ PP(pp_tie) break; case SVt_PVGV: if (isGV_with_GP(varsv)) { -#ifdef GV_UNIQUE_CHECK - if (GvUNIQUE((const GV *)varsv)) { - Perl_croak(aTHX_ "Attempt to tie unique GV"); - } -#endif methname = "TIEHANDLE"; how = PERL_MAGIC_tiedscalar; /* For tied filehandles, we apply tiedscalar magic to the IO @@ -3621,12 +3621,6 @@ S_glob_assign_glob(pTHX_ SV *const dstr, SV *const sstr, const int dtype) SvFAKE_on(dstr); /* can coerce to non-glob */ } -#ifdef GV_UNIQUE_CHECK - if (GvUNIQUE((const GV *)dstr)) { - Perl_croak(aTHX_ "%s", PL_no_modify); - } -#endif - if(GvGP(MUTABLE_GV(sstr))) { /* If source has method cache entry, clear it */ if(GvCVGEN(sstr)) { @@ -3680,12 +3674,6 @@ S_glob_assign_ref(pTHX_ SV *const dstr, SV *const sstr) PERL_ARGS_ASSERT_GLOB_ASSIGN_REF; -#ifdef GV_UNIQUE_CHECK - if (GvUNIQUE((const GV *)dstr)) { - Perl_croak(aTHX_ "%s", PL_no_modify); - } -#endif - if (intro) { GvINTRO_off(dstr); /* one-shot flag */ GvLINE(dstr) = CopLINE(PL_curcop); @@ -10909,9 +10897,6 @@ Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) break; case SVt_PVGV: - if (GvUNIQUE((const GV *)sstr)) { - NOOP; /* Do sharing here, and fall through */ - } case SVt_PVIO: case SVt_PVFM: case SVt_PVHV: @@ -11123,8 +11108,7 @@ Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) CvROOT(dstr) = OpREFCNT_inc(CvROOT(dstr)); OP_REFCNT_UNLOCK; if (CvCONST(dstr) && CvISXSUB(dstr)) { - CvXSUBANY(dstr).any_ptr = GvUNIQUE(CvGV(dstr)) ? - SvREFCNT_inc(CvXSUBANY(dstr).any_ptr) : + CvXSUBANY(dstr).any_ptr = sv_dup_inc((const SV *)CvXSUBANY(dstr).any_ptr, param); } /* don't dup if copying back - CvGV isn't refcounted, so the @@ -4376,11 +4376,6 @@ Perl_yylex(pTHX) if (len == 6 && strnEQ(SvPVX(sv), "unique", len)) { sv_free(sv); if (PL_in_my == KEY_our) { -#ifdef USE_ITHREADS - GvUNIQUE_on(cGVOPx_gv(pl_yylval.opval)); -#else - /* skip to avoid loading attributes.pm */ -#endif deprecate(":unique"); } else |