diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-29 15:58:14 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-29 15:58:14 +0000 |
commit | c69033f2a629160559f680da8e4e5a7e3c4c3a0c (patch) | |
tree | d19b6ca86b0f5cbbbb1e078ab96eac111df03dfd /gv.h | |
parent | 9dc0b5dcb80b5128172acb8c4bd670aa72142821 (diff) | |
download | perl-c69033f2a629160559f680da8e4e5a7e3c4c3a0c.tar.gz |
First stab at not automatically creating an unused SV for GvSV
Enable it with -DPERL_DONT_CREATE_GVSV.
Currently if enabled 22 test scripts have failures, so still some way
to go.
p4raw-id: //depot/perl@25009
Diffstat (limited to 'gv.h')
-rw-r--r-- | gv.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -42,6 +42,14 @@ Return the SV from the GV. */ #define GvSV(gv) (GvGP(gv)->gp_sv) +#ifdef PERL_DONT_CREATE_GVSV +#define GvSVn(gv) (GvGP(gv)->gp_sv ? \ + GvGP(gv)->gp_sv : \ + GvGP(gv_SVadd(gv))->gp_sv) +#else +#define GvSVn(gv) GvSV(gv) +#endif + #define GvREFCNT(gv) (GvGP(gv)->gp_refcnt) #define GvIO(gv) ((gv) && SvTYPE((SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : 0) #define GvIOp(gv) (GvGP(gv)->gp_io) |