diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-01-28 13:38:28 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-01-28 13:38:28 +0000 |
commit | 4f2da183afece5ce28d1dcdb66d8d931eb0d976a (patch) | |
tree | 0ac0c94cde46c822be65a07383ae61e30a90a9dd /sv.h | |
parent | b8473700d76df372cb0ff6b7c4953731e2d985c2 (diff) | |
download | perl-4f2da183afece5ce28d1dcdb66d8d931eb0d976a.tar.gz |
By changing SvVOK() from returning 0/1 to 0/pointer-to-magic we can
save duplicating mg_find calls, without changing the semantics in any
boolean context.
p4raw-id: //depot/perl@26979
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -751,7 +751,8 @@ in gv.h: */ SVf_IVisUV), \ SvFLAGS(sv) |= (SVf_POK|SVp_POK)) -#define SvVOK(sv) (SvMAGICAL(sv) && mg_find(sv,'V')) +#define SvVOK(sv) (SvMAGICAL(sv) \ + ? mg_find(sv,PERL_MAGIC_vstring) : NULL) #define SvOOK(sv) (SvFLAGS(sv) & SVf_OOK) #define SvOOK_on(sv) ((void)SvIOK_off(sv), SvFLAGS(sv) |= SVf_OOK) #define SvOOK_off(sv) ((void)(SvOOK(sv) && sv_backoff(sv))) |