summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-07-06 15:29:11 -0600
committerKarl Williamson <public@khwilliamson.com>2013-07-16 13:58:09 -0600
commite94d9b54a21e9546724df09abe1968bd32f833cf (patch)
tree58ab85e39fc1b2d10d9b284c62f14c651d4c8bb2 /sv.h
parent596005989a9f38f57e92b1769576e19a9527c59a (diff)
downloadperl-e94d9b54a21e9546724df09abe1968bd32f833cf.tar.gz
Reinstate "Create SVt_INVLIST"
This reverts commit 49cf1d6641a6dfd301302f616e4f25595dcc65d4, which reverted e045dbedc7da04e20cc8cfccec8a2e3ccc62cc8b, thus reinstating the latter commit. It turns out that the error being chased down was not due to this commit. Its original message was: This reshuffles the svtype enum to remove the dummy slot created in a previous commit, and add the new SVt_INVLIST type in its proper order. It still is unused, but since it is an extension of SVt_PV, it must be greater than that type's enum value. Since it can't be upgraded to any other PV type, it comes right after SVt_PV. Affected tables in the core are updated.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/sv.h b/sv.h
index 1f9145f6bc..0205f5866e 100644
--- a/sv.h
+++ b/sv.h
@@ -29,6 +29,7 @@ The types are:
SVt_PVIV
SVt_PVNV
SVt_PVMG
+ SVt_INVLIST
SVt_REGEXP
SVt_PVGV
SVt_PVLV
@@ -56,7 +57,8 @@ typeglob has been assigned. Assigning to it again will stop it from being
a typeglob. SVt_PVLV represents a scalar that delegates to another scalar
behind the scenes. It is used, e.g., for the return value of C<substr> and
for tied hash and array elements. It can hold any scalar value, including
-a typeglob. SVt_REGEXP is for regular expressions.
+a typeglob. SVt_REGEXP is for regular expressions. SVt_INVLIST is for Perl
+core internal use only.
SVt_PVMG represents a "normal" scalar (not a typeglob, regular expression,
or delegate). Since most scalars do not need all the internal fields of a
@@ -90,6 +92,9 @@ Type flag for scalars. See L</svtype>.
=for apidoc AmU||SVt_PVMG
Type flag for scalars. See L</svtype>.
+=for apidoc AmU||SVt_INVLIST
+Type flag for scalars. See L</svtype>.
+
=for apidoc AmU||SVt_REGEXP
Type flag for regular expressions. See L</svtype>.
@@ -119,11 +124,12 @@ Type flag for I/O objects. See L</svtype>.
typedef enum {
SVt_NULL, /* 0 */
- SVt_DUMMY, /* 1 */
- SVt_IV, /* 2 */
- SVt_NV, /* 3 */
+ /* BIND was here, before INVLIST replaced it. */
+ SVt_IV, /* 1 */
+ SVt_NV, /* 2 */
/* RV was here, before it was merged with IV. */
- SVt_PV, /* 4 */
+ SVt_PV, /* 3 */
+ SVt_INVLIST, /* 4, implemented as a PV */
SVt_PVIV, /* 5 */
SVt_PVNV, /* 6 */
SVt_PVMG, /* 7 */
@@ -140,7 +146,9 @@ typedef enum {
} svtype;
/* *** any alterations to the SV types above need to be reflected in
- * SVt_MASK and the various PL_valid_types_* tables */
+ * SVt_MASK and the various PL_valid_types_* tables. As of this writing those
+ * 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 */
#define SVt_MASK 0xf /* smallest bitmask that covers all types */