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.
#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), \