summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-23 11:11:12 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-23 11:11:12 +0000
commit180488f8452e93d2afa0f62b189be1cc9ac6ba1a (patch)
tree9383eeeaa7cf0787e424f50616bce24f647f5f52 /sv.h
parent4115f1412e498d2b0cb499d036610a0e9f8e2c4f (diff)
downloadperl-180488f8452e93d2afa0f62b189be1cc9ac6ba1a.tar.gz
Remove get magic from typeglobs. This means that PVGVs holding
typeglobs never need to use SvPVX. This comes at price - typeglobs were using magic get for their stringificiation, and to pass SvOK(), so need to make typeglobs SvOK by default (by sucking SVp_SCREAM into SVf_OK - it's the only flag left), tweak SvSCREAM() to also check SVp_POK, and teach sv_2[inpu]v how to convert globs. However, it should free up SvPVX for the next part of the plan to pointer indirections, and therefore CPU cache pressure. p4raw-id: //depot/perl@27278
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.h b/sv.h
index c15a65869a..4f9721469e 100644
--- a/sv.h
+++ b/sv.h
@@ -252,7 +252,7 @@ perform the upgrade if necessary. See C<svtype>.
#define SVf_THINKFIRST (SVf_READONLY|SVf_ROK|SVf_FAKE)
#define SVf_OK (SVf_IOK|SVf_NOK|SVf_POK|SVf_ROK| \
- SVp_IOK|SVp_NOK|SVp_POK)
+ SVp_IOK|SVp_NOK|SVp_POK|SVp_SCREAM)
#define PRIVSHIFT 4 /* (SVp_?OK >> PRIVSHIFT) == SVf_?OK */
@@ -897,7 +897,7 @@ in gv.h: */
#define SvREADONLY_on(sv) (SvFLAGS(sv) |= SVf_READONLY)
#define SvREADONLY_off(sv) (SvFLAGS(sv) &= ~SVf_READONLY)
-#define SvSCREAM(sv) (SvFLAGS(sv) & SVp_SCREAM)
+#define SvSCREAM(sv) ((SvFLAGS(sv) & (SVp_SCREAM|SVp_POK)) == (SVp_SCREAM|SVp_POK))
#define SvSCREAM_on(sv) (SvFLAGS(sv) |= SVp_SCREAM)
#define SvSCREAM_off(sv) (SvFLAGS(sv) &= ~SVp_SCREAM)