diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-24 11:52:28 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-24 11:52:28 +0000 |
commit | 035dab7448e2a9119f77775183b21181a53213a3 (patch) | |
tree | 17f1c958b3fa7526c2ae2bccccbf908f1e2aae68 /pad.c | |
parent | 6f58c29fcbfb50c3a72f7728b0d7c12ef3ba840c (diff) | |
download | perl-035dab7448e2a9119f77775183b21181a53213a3.tar.gz |
Replace usage of GvSTASH for storing the stash of C<our> with
OURSTASH. Set the stash with OURSTASH_SET.
p4raw-id: //depot/perl@27306
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -321,7 +321,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 -GvSTASH to that value +OURSTASH to that value If fake, it means we're cloning an existing entry @@ -347,7 +347,7 @@ Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool fake } if (ourstash) { SvPAD_OUR_on(namesv); - GvSTASH(namesv) = ourstash; + OURSTASH_set(namesv, ourstash); Perl_sv_add_backref(aTHX_ (SV*)ourstash, namesv); } @@ -549,7 +549,7 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash) && sv != &PL_sv_undef && !SvFAKE(sv) && (SvIVX(sv) == PAD_MAX || SvIVX(sv) == 0) - && ((SvPAD_OUR(sv)) && GvSTASH(sv) == ourstash) + && OURSTASH(sv) == ourstash && strEQ(name, SvPVX_const(sv))) { Perl_warner(aTHX_ packWARN(WARN_MISC), @@ -838,8 +838,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, - SvPAD_OUR(*out_name_sv) - ? GvSTASH(*out_name_sv) : NULL, + OURSTASH(*out_name_sv), 1 /* fake */ ); |