summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-07-16 22:01:08 -0600
committerKarl Williamson <public@khwilliamson.com>2013-07-19 10:35:14 -0600
commit1078c6a2c81c4b65a2bdfe9f9778a03e3fb57bec (patch)
tree72203ef888c02be1119cc803af6f9ca3f689e72d /sv.h
parent56e1cca174a06a1be569b25dd29cf4b8d6a5bf9d (diff)
downloadperl-1078c6a2c81c4b65a2bdfe9f9778a03e3fb57bec.tar.gz
sv.h: Comments added/typo fixed.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 7110b4c13d..32fe7444d9 100644
--- a/sv.h
+++ b/sv.h
@@ -120,8 +120,14 @@ Type flag for formats. See L</svtype>.
Type flag for I/O objects. See L</svtype>.
=cut
+
+ These are ordered so that the simpler types have a lower value; SvUPGRADE
+ doesn't allow you to upgrade from a higher numbered type to a lower numbered
+ one; also there is code that assumes that anything that has as a PV component
+ has a type numbered >= SVt_PV.
*/
+
typedef enum {
SVt_NULL, /* 0 */
/* BIND was here, before INVLIST replaced it. */
@@ -154,7 +160,7 @@ typedef enum {
#ifndef PERL_CORE
/* Although Fast Boyer Moore tables are now being stored in PVGVs, for most
- purposes eternal code wanting to consider PVBM probably needs to think of
+ purposes external code wanting to consider PVBM probably needs to think of
PVMG instead. */
# define SVt_PVBM SVt_PVMG
/* Anything wanting to create a reference from clean should ensure that it has
@@ -943,6 +949,7 @@ in gv.h: */
#define HvAMAGIC_off(hv) (SvFLAGS(hv) &=~ SVf_AMAGIC)
+/* "nog" means "doesn't have get magic" */
#define SvPOK_nog(sv) ((SvFLAGS(sv) & (SVf_POK|SVs_GMG)) == SVf_POK)
#define SvIOK_nog(sv) ((SvFLAGS(sv) & (SVf_IOK|SVs_GMG)) == SVf_IOK)
#define SvUOK_nog(sv) ((SvFLAGS(sv) & (SVf_IOK|SVf_IVisUV|SVs_GMG)) == (SVf_IOK|SVf_IVisUV))