This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Inversion lists are SvPOK
authorKarl Williamson <khw@cpan.org>
Sat, 2 Nov 2019 16:06:33 +0000 (10:06 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 3 Nov 2019 15:59:43 +0000 (08:59 -0700)
They always have a string, and making them this allows B to access it.

regcomp.c

index 19216dc..2058499 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9199,6 +9199,7 @@ S_initialize_invlist_guts(pTHX_ SV* invlist, const Size_t initial_size)
     invlist_iterfinish(invlist);
 
     *get_invlist_previous_index_addr(invlist) = 0;
+    SvPOK_on(invlist);  /* This allows B to extract the PV */
 }
 
 SV*
@@ -9273,6 +9274,7 @@ Perl__new_invlist_C_array(pTHX_ const UV* const list)
     invlist_iterfinish(invlist);
 
     SvREADONLY_on(invlist);
+    SvPOK_on(invlist);
 
     return invlist;
 }