summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-24 11:17:13 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 09:40:01 +0200
commite1dcbbca67be0410a61078d0abb9ff53fb4b3c0a (patch)
tree87b0b065881bdaed61a382eaebad886fcb49e71d /sv.h
parent1979170bfeba87d234d4d34023c2ea5feeb22f48 (diff)
downloadperl-e1dcbbca67be0410a61078d0abb9ff53fb4b3c0a.tar.gz
Use 0x40008000 in SvFLAGS() for SVpad_NAME, not 0x40000000
This eliminates potential confusion between SVpad_NAME and SVpbm_VALID.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/sv.h b/sv.h
index 71faf2bf86..3d483163bf 100644
--- a/sv.h
+++ b/sv.h
@@ -367,8 +367,21 @@ perform the upgrade if necessary. See C<svtype>.
/* PVHV */
#define SVphv_SHAREKEYS 0x20000000 /* PVHV keys live on shared string table */
-/* PVNV, PVMG, presumably only inside pads */
-#define SVpad_NAME 0x40000000 /* This SV is a name in the PAD, so
+
+/* PVNV, PVMG only, and only used in pads. Should be safe to test on any scalar
+ SV, as the core is careful to avoid setting both.
+
+ SVf_POK, SVp_POK also set:
+ 0x00004400 Normal
+ 0x0000C400 Studied (SvSCREAM)
+ 0x40004400 FBM compiled (SvVALID)
+ 0x4000C400 pad name.
+
+ 0x00008000 GV with GP
+ 0x00008800 RV with PCS imported
+*/
+#define SVpad_NAME (SVp_SCREAM|SVpbm_VALID)
+ /* This SV is a name in the PAD, so
SVpad_TYPED, SVpad_OUR and SVpad_STATE
apply */
/* PVAV */