# define GvNAMELEN(gv) (GvXPVGV(gv)->xgv_namelen)
#endif
+#define GvASSIGN_GENERATION(gv) (0 + ((XPV*) SvANY(gv))->xpv_cur)
+#define GvASSIGN_GENERATION_set(gv,val) \
+ STMT_START { assert(SvTYPE(gv) == SVt_PVGV); \
+ (((XPV*) SvANY(gv))->xpv_cur = (val)); } STMT_END
+
/*
=head1 GV Functions
if (PL_opargs[curop->op_type] & OA_DANGEROUS) {
if (curop->op_type == OP_GV) {
GV *gv = cGVOPx_gv(curop);
- if (gv == PL_defgv || (int)SvCUR(gv) == PL_generation)
+ if (gv == PL_defgv
+ || (int)GvASSIGN_GENERATION(gv) == PL_generation)
break;
- SvCUR_set(gv, PL_generation);
+ GvASSIGN_GENERATION_set(gv, PL_generation);
}
else if (curop->op_type == OP_PADSV ||
curop->op_type == OP_PADAV ||
#else
GV *gv = (GV*)((PMOP*)curop)->op_pmreplroot;
#endif
- if (gv == PL_defgv || (int)SvCUR(gv) == PL_generation)
+ if (gv == PL_defgv
+ || (int)GvASSIGN_GENERATION(gv) == PL_generation)
break;
- SvCUR_set(gv, PL_generation);
+ GvASSIGN_GENERATION_set(gv, PL_generation);
+ GvASSIGN_GENERATION_set(gv, PL_generation);
}
}
else