This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Subject: [perl #58182] partial: Add uni \s,\w matching
authorKarl Williamson <public@khwilliamson.com>
Fri, 24 Sep 2010 05:36:40 +0000 (23:36 -0600)
committerJesse Vincent <jesse@bestpractical.com>
Fri, 15 Oct 2010 14:14:29 +0000 (23:14 +0900)
commita12cf05f80a65e40fe339b086ab2d10e18d838c1
treebd1254d24bac6bb121801a2a06d01c7e17703b92
parentbdc22dd52e899130c8c4111c985fcbd7eec164a5
Subject: [perl #58182] partial: Add uni \s,\w matching

This commit causes regex sequences \b, \s, and \w (and complements) to
match in the latin1 range in the scope of feature 'unicode_strings' or
with the /u regex modifier.

It uses the previously unused flags field in the respective regnodes to
indicate the type of matching, and in regexec.c, uses that to decide
which of the handy.h macros to use, native or Latin1.

I chose this for now rather than create new nodes for each type of
match.  An earlier version of this patch did that, and in every case the
switch case: statements were adjacent, offering no performance
advantage.  If regexec were modified to use in-line functions or more
macros for various short section of it, then it would be faster to have
new nodes rather than using the flags field.  But, using that field
simplified things, as this change flies under the radar in a number of
places where it would not if separate nodes were used.
lib/feature/unicode_strings.t
pod/perldelta.pod
pod/perlre.pod
pod/perlrecharclass.pod
pod/perlunicode.pod
pod/perlunifaq.pod
regcomp.c
regcomp.h
regexec.c