summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-06-11 16:57:22 -0600
committerKarl Williamson <public@khwilliamson.com>2013-07-03 19:21:19 -0600
commite045dbedc7da04e20cc8cfccec8a2e3ccc62cc8b (patch)
tree4e3f84c2751b6512a15f8fb3a5c656e849152d20 /sv.c
parent05944450e0fc82eb8fc1fb5a4bf63f23785262a0 (diff)
downloadperl-e045dbedc7da04e20cc8cfccec8a2e3ccc62cc8b.tar.gz
Create SVt_INVLIST
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.c')
-rw-r--r--sv.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sv.c b/sv.c
index ec70030886..a3b0bb4a1e 100644
--- a/sv.c
+++ b/sv.c
@@ -881,11 +881,6 @@ static const struct body_details bodies_by_type[] = {
/* HEs use this offset for their arena. */
{ 0, 0, 0, SVt_NULL, FALSE, NONV, NOARENA, 0 },
- /* The bind placeholder pretends to be an RV for now.
- Also it's marked as "can't upgrade" to stop anyone using it before it's
- implemented. */
- { 0, 0, 0, SVt_DUMMY, TRUE, NONV, NOARENA, 0 },
-
/* IVs are in the head, so the allocation size is 0. */
{ 0,
sizeof(IV), /* This is used to copy out the IV body. */
@@ -903,6 +898,11 @@ static const struct body_details bodies_by_type[] = {
SVt_PV, FALSE, NONV, HASARENA,
FIT_ARENA(0, sizeof(XPV) - STRUCT_OFFSET(XPV, xpv_cur)) },
+ /* The invlist placeholder pretends to be an RV for now.
+ Also it's marked as "can't upgrade" to stop anyone using it before it's
+ implemented. */
+ { 0, 0, 0, SVt_INVLIST, TRUE, NONV, NOARENA, 0 },
+
{ sizeof(XPVIV) - STRUCT_OFFSET(XPV, xpv_cur),
copy_length(XPVIV, xiv_u) - STRUCT_OFFSET(XPV, xpv_cur),
+ STRUCT_OFFSET(XPV, xpv_cur),
@@ -4117,7 +4117,7 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, SV* sstr, const I32 flags)
}
break;
- /* case SVt_DUMMY: */
+ /* case SVt_INVLIST: */
case SVt_PVLV:
case SVt_PVGV:
case SVt_PVMG:
@@ -6178,7 +6178,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
SvREFCNT_dec(SvSTASH(sv));
}
switch (type) {
- /* case SVt_DUMMY: */
+ /* case SVt_INVLIST: */
case SVt_PVIO:
if (IoIFP(sv) &&
IoIFP(sv) != PerlIO_stdin() &&
@@ -9440,7 +9440,7 @@ Perl_sv_reftype(pTHX_ const SV *const sv, const int ob)
? "GLOB" : "SCALAR");
case SVt_PVFM: return "FORMAT";
case SVt_PVIO: return "IO";
- case SVt_DUMMY: return "DUMMY";
+ case SVt_INVLIST: return "INVLIST";
case SVt_REGEXP: return "REGEXP";
default: return "UNKNOWN";
}
@@ -12177,7 +12177,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
SvANY(dstr) = new_XNV();
SvNV_set(dstr, SvNVX(sstr));
break;
- /* case SVt_DUMMY: */
+ /* case SVt_INVLIST: */
default:
{
/* These are all the types that need complex bodies allocating. */