diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-25 16:48:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-25 16:48:46 +0000 |
commit | 169d2d72355cfee106217aa142a9e61dc32e53d9 (patch) | |
tree | 9d3a981bdf184f258c8f9abe528a2f4cf7930ed3 /gv.h | |
parent | 584307902de552f84517013f42d1db478f4102bd (diff) | |
download | perl-169d2d72355cfee106217aa142a9e61dc32e53d9.tar.gz |
Abstract the specific use of SvCUR in GVs for detecting variables on
both sides of an assignment using GvASSIGN_GENERATION() and
GvASSIGN_GENERATION_set().
p4raw-id: //depot/perl@27327
Diffstat (limited to 'gv.h')
-rw-r--r-- | gv.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -63,6 +63,11 @@ struct gp { # 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 |