summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-01-16 10:23:31 -0700
committerKarl Williamson <public@khwilliamson.com>2014-01-16 10:53:05 -0700
commitdbfdbd2685aa055f4e4a3b9cb568635771805959 (patch)
tree971ad7e5194c32680433471aa72b1629b2249c65 /regcomp.c
parentc0c03436e9533fd23f6ff162659efff572844687 (diff)
downloadperl-dbfdbd2685aa055f4e4a3b9cb568635771805959.tar.gz
Turn on read-only flag for some unchangeable inversion lists
These lists are read-only. Turning on the flag may allow some optimisations to be done, including some that may be added in the future.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index d53105355d..decbe4a7ad 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -7686,6 +7686,8 @@ Perl__new_invlist_C_array(pTHX_ const UV* const list)
/* Initialize the iteration pointer. */
invlist_iterfinish(invlist);
+ SvREADONLY_on(invlist);
+
return invlist;
}
#endif /* ifndef PERL_IN_XSUB_RE */