diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-02-19 11:43:08 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-02-20 09:22:17 +0100 |
commit | 3f2ee99ade0c181233cf46892c1f80db54b71451 (patch) | |
tree | 2a8f561c198a254fd632c75039962a90c9928125 /sv.h | |
parent | c7bac10acd8724f859ddcb81408cfdbeee046f8f (diff) | |
download | perl-3f2ee99ade0c181233cf46892c1f80db54b71451.tar.gz |
Remove the check for SVt_BIND from SvOK().
The original plan to use SVt_BIND to implement read-only aliases to
read-write values is unlikely to happen. More importantly, it's not going
to happen within a maint branch, so there's no reason to have the code
"just in case" it does. The code can easily be re-instated in blead if it
is needed in future. Nothing on CPAN is relying on this code. (Almost no
code on CPAN even references SVt_BIND.)
This effectively reverts part of commit 1cb9cd5016282146 from Dec 2006.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -801,11 +801,7 @@ Set the actual length of the string which is in the SV. See C<SvIV_set>. #define assert_not_ROK(sv) assert_(!SvROK(sv) || !SvRV(sv)) #define assert_not_glob(sv) assert_(!isGV_with_GP(sv)) -#define SvOK(sv) ((SvTYPE(sv) == SVt_BIND) \ - ? (SvFLAGS(SvRV(sv)) & SVf_OK \ - || isREGEXP(SvRV(sv))) \ - : (SvFLAGS(sv) & SVf_OK \ - || isREGEXP(sv))) +#define SvOK(sv) (SvFLAGS(sv) & SVf_OK || isREGEXP(sv)) #define SvOK_off(sv) (assert_not_ROK(sv) assert_not_glob(sv) \ SvFLAGS(sv) &= ~(SVf_OK| \ SVf_IVisUV|SVf_UTF8), \ |