}
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);
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.
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
}
if (ourstash) {
SvPAD_OUR_on(namesv);
- OURSTASH_set(namesv, ourstash);
+ SvOURSTASH_set(namesv, ourstash);
SvREFCNT_inc_simple_void_NN(ourstash);
}
else if (state) {
&& 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),
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 */
);
#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]))
}
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))
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))
# 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; \