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 /sv.h | |
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 'sv.h')
-rw-r--r-- | sv.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -937,6 +937,13 @@ in gv.h: */ ((SvFLAGS(sv) & (SVpad_NAME|SVpad_OUR)) == (SVpad_NAME|SVpad_OUR)) #define SvPAD_OUR_on(sv) (SvFLAGS(sv) |= SVpad_NAME|SVpad_OUR) +#define OURSTASH(sv) (SvPAD_OUR(sv) ? GvSTASH(sv) : NULL) +#define OURSTASH_set(sv, st) \ + STMT_START { \ + assert(SvTYPE(sv) == SVt_PVGV); \ + GvSTASH(sv) = st; \ + } STMT_END + #ifdef PERL_DEBUG_COW #define SvRV(sv) (0 + (sv)->sv_u.svu_rv) #else |