diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-03 23:13:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-03 23:13:43 +0000 |
commit | 73d95100627fbb8760df38c23d7563a42cc2b6f6 (patch) | |
tree | 68472e16d74ab36f73e675571379093dc250fe85 | |
parent | 7c197c94dc644853d0512a443fd0e99a5f287ad0 (diff) | |
download | perl-73d95100627fbb8760df38c23d7563a42cc2b6f6.tar.gz |
Rename OURSTASH to SvOURSTASH and OURSTASH_set to SvOURSTASH_set.
p4raw-id: //depot/perl@29679
-rw-r--r-- | dump.c | 4 | ||||
-rw-r--r-- | pad.c | 10 | ||||
-rw-r--r-- | pad.h | 2 | ||||
-rw-r--r-- | sv.c | 4 | ||||
-rw-r--r-- | sv.h | 4 |
5 files changed, 12 insertions, 12 deletions
@@ -1553,8 +1553,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo } if (type >= SVt_PVMG) { if (type == SVt_PVMG && SvPAD_OUR(sv)) { - if (OURSTASH(sv)) - do_hv_dump(level, file, " OURSTASH", OURSTASH(sv)); + if (SvOURSTASH(sv)) + do_hv_dump(level, file, " OURSTASH", SvOURSTASH(sv)); } else { if (SvMAGIC(sv)) do_magic_dump(level, file, SvMAGIC(sv), nest, maxnest, dumpops, pvlim); @@ -75,7 +75,7 @@ The SVs in the names AV have their PV being the name of the variable. xlow+1..xhigh inclusive in the NV union is a range of cop_seq numbers for which the name is valid. For typed lexicals name SV is SVt_PVMG and SvSTASH points at the type. For C<our> lexicals, the type is also SVt_PVMG, with the -OURSTASH slot pointing at the stash of the associated global (so that +SvOURSTASH slot pointing at the stash of the associated global (so that duplicate C<our> declarations in the same package can be detected). SvUVX is sometimes hijacked to store the generation number during compilation. @@ -335,7 +335,7 @@ offset. If C<typestash> is valid, the name is for a typed lexical; set the name's stash to that value. If C<ourstash> is valid, it's an our lexical, set the name's -OURSTASH to that value +SvOURSTASH to that value If fake, it means we're cloning an existing entry @@ -362,7 +362,7 @@ Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool fake } if (ourstash) { SvPAD_OUR_on(namesv); - OURSTASH_set(namesv, ourstash); + SvOURSTASH_set(namesv, ourstash); SvREFCNT_inc_simple_void_NN(ourstash); } else if (state) { @@ -567,7 +567,7 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash) && sv != &PL_sv_undef && !SvFAKE(sv) && (COP_SEQ_RANGE_HIGH(sv) == PAD_MAX || COP_SEQ_RANGE_HIGH(sv) == 0) - && OURSTASH(sv) == ourstash + && SvOURSTASH(sv) == ourstash && strEQ(name, SvPVX_const(sv))) { Perl_warner(aTHX_ packWARN(WARN_MISC), @@ -853,7 +853,7 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn, SvPVX_const(*out_name_sv), SvPAD_TYPED(*out_name_sv) ? SvSTASH(*out_name_sv) : NULL, - OURSTASH(*out_name_sv), + SvOURSTASH(*out_name_sv), 1, /* fake */ 0 /* not a state variable */ ); @@ -295,7 +295,7 @@ ling pad (lvalue) to C<gen>. Note that C<SvUV_set> is hijacked for this purpose #define PAD_COMPNAME_TYPE(po) pad_compname_type(po) #define PAD_COMPNAME_OURSTASH(po) \ - (OURSTASH(PAD_COMPNAME_SV(po))) + (SvOURSTASH(PAD_COMPNAME_SV(po))) #define PAD_COMPNAME_GEN(po) ((STRLEN)SvUVX(AvARRAY(PL_comppad_name)[po])) @@ -5120,7 +5120,7 @@ Perl_sv_clear(pTHX_ register SV *sv) } if (type >= SVt_PVMG) { if (type == SVt_PVMG && SvPAD_OUR(sv)) { - SvREFCNT_dec(OURSTASH(sv)); + SvREFCNT_dec(SvOURSTASH(sv)); } else if (SvMAGIC(sv)) mg_free(sv); if (type == SVt_PVMG && SvPAD_TYPED(sv)) @@ -10024,7 +10024,7 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param) FIXME - instrument and check that assumption */ if (sv_type >= SVt_PVMG) { if ((sv_type == SVt_PVMG) && SvPAD_OUR(dstr)) { - OURSTASH_set(dstr, hv_dup_inc(OURSTASH(dstr), param)); + SvOURSTASH_set(dstr, hv_dup_inc(SvOURSTASH(dstr), param)); } else if (SvMAGIC(dstr)) SvMAGIC_set(dstr, mg_dup(SvMAGIC(dstr), param)); if (SvSTASH(dstr)) @@ -1206,9 +1206,9 @@ the scalar's value cannot change unless written to. # define SvPAD_STATE_on(sv) (SvFLAGS(sv) |= SVpad_NAME|SVpad_STATE) #endif -#define OURSTASH(sv) \ +#define SvOURSTASH(sv) \ (SvPAD_OUR(sv) ? ((XPVMG*) SvANY(sv))->xmg_u.xmg_ourstash : NULL) -#define OURSTASH_set(sv, st) \ +#define SvOURSTASH_set(sv, st) \ STMT_START { \ assert(SvTYPE(sv) == SVt_PVMG); \ ((XPVMG*) SvANY(sv))->xmg_u.xmg_ourstash = st; \ |