summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>1998-07-07 19:48:36 +0200
committerGurusamy Sarathy <gsar@cpan.org>1998-07-08 02:28:30 +0000
commit827b7e14e1e607ab4ad9d3216e9bea55f7e0b975 (patch)
tree781251208600e2bd75ae7671142159e996556c80 /sv.h
parent7e86de3e163f833ae89c22b4ee3418ae793e26c5 (diff)
downloadperl-827b7e14e1e607ab4ad9d3216e9bea55f7e0b975.tar.gz
Remove some rendundant SvOOK_on tests
Message-ID: <m3vhp94q7f.fsf@furu.g.aas.no> p4raw-id: //depot/perl@1366
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/sv.h b/sv.h
index b33998b7a7..d75ec5af59 100644
--- a/sv.h
+++ b/sv.h
@@ -149,6 +149,8 @@ struct io {
#ifdef OVERLOAD
#define SVf_AMAGIC 0x10000000 /* has magical overloaded methods */
+#else
+#define SVf_AMAGIC 0 /* can be or-ed without effect */
#endif /* OVERLOAD */
#define PRIVSHIFT 8
@@ -324,13 +326,8 @@ struct xpvio {
SVp_IOK|SVp_NOK))
#define SvOK(sv) (SvFLAGS(sv) & SVf_OK)
-
-#ifdef OVERLOAD
#define SvOK_off(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC), \
SvOOK_off(sv))
-#else
-#define SvOK_off(sv) (SvFLAGS(sv) &= ~SVf_OK, SvOOK_off(sv))
-#endif /* OVERLOAD */
#define SvOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK))
#define SvIOKp(sv) (SvFLAGS(sv) & SVp_IOK)
@@ -344,7 +341,7 @@ struct xpvio {
#define SvIOK_on(sv) (SvOOK_off(sv), \
SvFLAGS(sv) |= (SVf_IOK|SVp_IOK))
#define SvIOK_off(sv) (SvFLAGS(sv) &= ~(SVf_IOK|SVp_IOK))
-#define SvIOK_only(sv) (SvOOK_off(sv), SvOK_off(sv), \
+#define SvIOK_only(sv) (SvOK_off(sv), \
SvFLAGS(sv) |= (SVf_IOK|SVp_IOK))
#define SvNOK(sv) (SvFLAGS(sv) & SVf_NOK)
@@ -356,14 +353,8 @@ struct xpvio {
#define SvPOK(sv) (SvFLAGS(sv) & SVf_POK)
#define SvPOK_on(sv) (SvFLAGS(sv) |= (SVf_POK|SVp_POK))
#define SvPOK_off(sv) (SvFLAGS(sv) &= ~(SVf_POK|SVp_POK))
-
-#ifdef OVERLOAD
-#define SvPOK_only(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC), \
+#define SvPOK_only(sv) (SvFLAGS(sv) &= ~(SVf_OK|SVf_AMAGIC), \
SvFLAGS(sv) |= (SVf_POK|SVp_POK))
-#else
-#define SvPOK_only(sv) (SvFLAGS(sv) &= ~SVf_OK, \
- SvFLAGS(sv) |= (SVf_POK|SVp_POK))
-#endif /* OVERLOAD */
#define SvOOK(sv) (SvFLAGS(sv) & SVf_OOK)
#define SvOOK_on(sv) (SvIOK_off(sv), SvFLAGS(sv) |= SVf_OOK)
@@ -375,12 +366,7 @@ struct xpvio {
#define SvROK(sv) (SvFLAGS(sv) & SVf_ROK)
#define SvROK_on(sv) (SvFLAGS(sv) |= SVf_ROK)
-
-#ifdef OVERLOAD
#define SvROK_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK|SVf_AMAGIC))
-#else
-#define SvROK_off(sv) (SvFLAGS(sv) &= ~SVf_ROK)
-#endif /* OVERLOAD */
#define SvMAGICAL(sv) (SvFLAGS(sv) & (SVs_GMG|SVs_SMG|SVs_RMG))
#define SvMAGICAL_on(sv) (SvFLAGS(sv) |= (SVs_GMG|SVs_SMG|SVs_RMG))