summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-31 13:42:04 -0600
committerKarl Williamson <khw@cpan.org>2019-11-16 05:58:47 -0700
commit90ba01ad5da73731a55047c417c339b68778d7ef (patch)
tree3e00e98acb3feb0b165002daab74506ea5ad9afd /sv.h
parent1d425dadd8d8b29b8b6225c59714175ee1c256b5 (diff)
downloadperl-90ba01ad5da73731a55047c417c339b68778d7ef.tar.gz
Double the number of possible SV types
As per discussion beginning in http://nntp.perl.org/group/perl.perl5.porters/25656
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sv.h b/sv.h
index ffeac41fe5..318bb056a5 100644
--- a/sv.h
+++ b/sv.h
@@ -149,6 +149,9 @@ typedef enum {
SVt_PVCV, /* 13 */
SVt_PVFM, /* 14 */
SVt_PVIO, /* 15 */
+ /* 16-31: Unused, though one should be reserved for a
+ * freed sv, if the other 3 bits below the flags ones
+ * get allocated */
SVt_LAST /* keep last in enum. used to size arrays */
} svtype;
@@ -157,10 +160,10 @@ typedef enum {
* tables are in perl.h. There are also two affected names tables in dump.c,
* one in B.xs, and 'bodies_by_type[]' in sv.c.
*
- * The bits that match 0xf0 are CURRENTLY UNUSED, except that 0xFF means a
- * freed SV. The bits above that are for flags, like SVf_IOK */
+ * The bits that match 0xe0 are CURRENTLY UNUSED
+ * The bits above that are for flags, like SVf_IOK */
-#define SVt_MASK 0xf /* smallest bitmask that covers all types */
+#define SVt_MASK 0x1f /* smallest bitmask that covers all types */
#ifndef PERL_CORE
/* Fast Boyer Moore tables are now stored in magic attached to PVMGs */