summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-02-10 10:35:48 -0700
committerKarl Williamson <public@khwilliamson.com>2012-02-11 13:31:33 -0700
commit24caacbccae7b938deecdcc3f13dd66c9c6a684e (patch)
treef08e7f10554bc874251d94d9d5b2684b40c6d706
parentbb0d02ab7b92c63044b4ee5631217dc06cb2e2ca (diff)
downloadperl-24caacbccae7b938deecdcc3f13dd66c9c6a684e.tar.gz
regcomp.c: Remove duplicate inversion list
\h and \p{XPosixBlank} contain the same code points, so there is no need to have both of them.
-rw-r--r--charclass_invlists.h26
-rw-r--r--regcomp.c9
-rw-r--r--regen/mk_invlists.pl1
-rw-r--r--sv.c2
4 files changed, 4 insertions, 34 deletions
diff --git a/charclass_invlists.h b/charclass_invlists.h
index 2cfcac6155..5d78219daa 100644
--- a/charclass_invlists.h
+++ b/charclass_invlists.h
@@ -36,32 +36,6 @@ UV ASCII_invlist[] = {
0
};
-UV HorizSpace_invlist[] = {
- 18, /* Number of elements */
- 0, /* Current iteration position */
- 1064334010, /* Version and data structure type */
- 1, /* 0 if this is the first element of the list proper;
- 1 if the next element is the first */
- 9,
- 10,
- 32,
- 33,
- 160,
- 161,
- 5760,
- 5761,
- 6158,
- 6159,
- 8192,
- 8203,
- 8239,
- 8240,
- 8287,
- 8288,
- 12288,
- 12289
-};
-
UV VertSpace_invlist[] = {
6, /* Number of elements */
0, /* Current iteration position */
diff --git a/regcomp.c b/regcomp.c
index fb10fc3468..23a2a3b602 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4841,8 +4841,6 @@ Perl_re_compile(pTHX_ SV * const pattern, U32 orig_pm_flags)
PL_L1PosixAlnum = _new_invlist_C_array(L1PosixAlnum_invlist);
PL_PosixAlnum = _new_invlist_C_array(PosixAlnum_invlist);
- PL_HorizSpace = _new_invlist_C_array(HorizSpace_invlist);
-
PL_L1PosixLower = _new_invlist_C_array(L1PosixLower_invlist);
PL_PosixLower = _new_invlist_C_array(PosixLower_invlist);
@@ -10863,12 +10861,13 @@ parseit:
/* For these, we use the nonbitmap, as /d doesn't make a
* difference in what these match. There would be problems
* if these characters had folds other than themselves, as
- * nonbitmap is subject to folding */
- _invlist_union(nonbitmap, PL_HorizSpace, &nonbitmap);
+ * nonbitmap is subject to folding. It turns out that \h
+ * is just a synonym for XPosixBlank */
+ _invlist_union(nonbitmap, PL_XPosixBlank, &nonbitmap);
break;
case ANYOF_NHORIZWS:
_invlist_union_complement_2nd(nonbitmap,
- PL_HorizSpace, &nonbitmap);
+ PL_XPosixBlank, &nonbitmap);
break;
case ANYOF_LOWER:
case ANYOF_NLOWER:
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl
index 46114bcfb1..31c77dee7a 100644
--- a/regen/mk_invlists.pl
+++ b/regen/mk_invlists.pl
@@ -93,7 +93,6 @@ output_invlist("AboveLatin1", [ 256 ]);
for my $prop (qw(
ASCII
- HorizSpace
VertSpace
PerlSpace
XPerlSpace
diff --git a/sv.c b/sv.c
index 068be55607..f02627bf6e 100644
--- a/sv.c
+++ b/sv.c
@@ -13406,8 +13406,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_L1PosixGraph = sv_dup_inc(proto_perl->IL1PosixGraph, param);
PL_PosixGraph = sv_dup_inc(proto_perl->IPosixGraph, param);
- PL_HorizSpace = sv_dup_inc(proto_perl->IHorizSpace, param);
-
PL_L1PosixLower = sv_dup_inc(proto_perl->IL1PosixLower, param);
PL_PosixLower = sv_dup_inc(proto_perl->IPosixLower, param);