In perl.git, the branch smoke-me/nicholas/SvOK-unbound has been updated <http://perl5.git.perl.org/perl.git/commitdiff/902157973f481ff9ac92cf7c9a91cdf055061b5f?hp=55673181017b5e113ef58bbb59978319aebbadcb>
- Log ----------------------------------------------------------------- commit 902157973f481ff9ac92cf7c9a91cdf055061b5f Author: Nicholas Clark <[email protected]> Date: Tue Feb 19 11:43:08 2013 +0100 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. ----------------------------------------------------------------------- Summary of changes: sv.h | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/sv.h b/sv.h index 54d606b..94ba1e6 100644 --- a/sv.h +++ b/sv.h @@ -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), \ -- Perl5 Master Repository
