diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-04-19 10:27:29 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-04-23 11:01:02 -0600 |
commit | 9d5011335690399fe873561a4a77839f45fa7868 (patch) | |
tree | de182eac3427f9a84f6f3729d902fbf20f8fbf20 /embed.h | |
parent | 3e91afe7b6982dfdf3dd108109d27df39fd1dd5a (diff) | |
download | perl-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 'embed.h')
-rw-r--r-- | embed.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -903,12 +903,12 @@ #define regcurly(a) S_regcurly(aTHX_ a) # endif # if defined(PERL_IN_REGCOMP_C) +#define _append_range_to_invlist(a,b,c) S__append_range_to_invlist(aTHX_ a,b,c) #define _invlist_array_init(a,b) S__invlist_array_init(aTHX_ a,b) #define _new_invlist_C_array(a) S__new_invlist_C_array(aTHX_ a) #define add_alternate(a,b,c) S_add_alternate(aTHX_ a,b,c) #define add_cp_to_invlist(a,b) S_add_cp_to_invlist(aTHX_ a,b) #define add_data S_add_data -#define add_range_to_invlist(a,b,c) S_add_range_to_invlist(aTHX_ a,b,c) #define checkposixcc(a) S_checkposixcc(aTHX_ a) #define cl_and S_cl_and #define cl_anything S_cl_anything @@ -959,7 +959,7 @@ #define _invlist_contents(a) Perl__invlist_contents(aTHX_ a) # endif # if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) -#define _append_range_to_invlist(a,b,c) Perl__append_range_to_invlist(aTHX_ a,b,c) +#define _add_range_to_invlist(a,b,c) Perl__add_range_to_invlist(aTHX_ a,b,c) #define _invlist_intersection_maybe_complement_2nd(a,b,c,d) Perl__invlist_intersection_maybe_complement_2nd(aTHX_ a,b,c,d) #define _invlist_invert(a) Perl__invlist_invert(aTHX_ a) #define _invlist_invert_prop(a) Perl__invlist_invert_prop(aTHX_ a) |