summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-02-19 11:43:08 +0100
committerNicholas Clark <nick@ccl4.org>2013-02-20 09:22:17 +0100
commit3f2ee99ade0c181233cf46892c1f80db54b71451 (patch)
tree2a8f561c198a254fd632c75039962a90c9928125 /sv.h
parentc7bac10acd8724f859ddcb81408cfdbeee046f8f (diff)
downloadperl-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.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/sv.h b/sv.h
index 54d606b4d9..94ba1e6e23 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), \