summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-04-19 10:27:29 -0600
committerKarl Williamson <public@khwilliamson.com>2012-04-23 11:01:02 -0600
commit9d5011335690399fe873561a4a77839f45fa7868 (patch)
treede182eac3427f9a84f6f3729d902fbf20f8fbf20 /utf8.c
parent3e91afe7b6982dfdf3dd108109d27df39fd1dd5a (diff)
downloadperl-9d5011335690399fe873561a4a77839f45fa7868.tar.gz
PATCH: [perl #112530] Panic with inversion lists
The code assumed that all property definitions would be well-formed, meaning, in part, that they would be numerically sorted by code point, with each range disjoint from all others. So, the code was just appending each range as it is found to the inversion list it is building. This assumption is true for all definitions generated by mktables, but it might not be true for user-defined ones. The solution is merely to change from calling the function that appends to instead call the existing function that handles the more general case. However, that function was not previously used outside the file it was defined in, so must now be made public. Also, this whole interface is considered volatile, so the names of the public functions in it begin with an underscore to further discourage XS writers from using them. Therefore the more general add function is renamed to begin with an underscore. And, the append function is no longer needed outside the file it is defined in, so again to keep XS writers from using it, this commit makes it static.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 1a69dd314c..8585eb1665 100644
--- a/utf8.c
+++ b/utf8.c
@@ -3771,7 +3771,7 @@ Perl__swash_to_invlist(pTHX_ SV* const swash)
break;
}
- _append_range_to_invlist(invlist, start, end);
+ invlist = _add_range_to_invlist(invlist, start, end);
}
/* Invert if the data says it should be */