summaryrefslogtreecommitdiff
path: root/inline_invlist.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-11 15:23:40 -0700
committerKarl Williamson <public@khwilliamson.com>2013-07-03 19:21:16 -0600
commit2c3365de8c1168f115576a4976d067e3b911c490 (patch)
tree0d20a3928cee038e457071d03e5fa8404a3a256c /inline_invlist.c
parent533c4e2f08b42d977e5004e823d4849f7473d2d0 (diff)
downloadperl-2c3365de8c1168f115576a4976d067e3b911c490.tar.gz
regcomp.c: Make inversion lists SVt_PVLV
This is the 2nd step in separating the inversion list body from header. This commit gives inversion lists the header from a SVt_PVLV, and repurposes one of its fields into being the length of the inversion list. This is a temporary measure, in case binary compatibility is an issue. Future commits will create a new SV type just for inversion lists. This SV type was chosen because it has a sufficient number of fields to accommodate all the header fields from inversion lists.
Diffstat (limited to 'inline_invlist.c')
-rw-r--r--inline_invlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/inline_invlist.c b/inline_invlist.c
index b194c0d264..f20f6daae0 100644
--- a/inline_invlist.c
+++ b/inline_invlist.c
@@ -41,7 +41,7 @@
#define ELEMENT_RANGE_MATCHES_INVLIST(i) (! ((i) & 1))
#define PREV_RANGE_MATCHES_INVLIST(i) (! ELEMENT_RANGE_MATCHES_INVLIST(i))
-PERL_STATIC_INLINE UV*
+PERL_STATIC_INLINE STRLEN*
S__get_invlist_len_addr(pTHX_ SV* invlist)
{
/* Return the address of the UV that contains the current number
@@ -49,7 +49,7 @@ S__get_invlist_len_addr(pTHX_ SV* invlist)
PERL_ARGS_ASSERT__GET_INVLIST_LEN_ADDR;
- return (UV *) (SvPVX(invlist) + (INVLIST_LEN_OFFSET * sizeof (UV)));
+ return &(LvTARGLEN(invlist));
}
PERL_STATIC_INLINE UV