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.fnc | |
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.fnc')
-rw-r--r-- | embed.fnc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1368,7 +1368,7 @@ ApR |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 m Ap |UV |swash_fetch |NN SV *swash|NN const U8 *ptr|bool do_utf8 #ifdef PERL_IN_REGCOMP_C EiMR |SV* |add_cp_to_invlist |NULLOK SV* invlist|const UV cp -EsMR |SV* |add_range_to_invlist |NULLOK SV* invlist|const UV start|const UV end +EsM |void |_append_range_to_invlist |NN SV* const invlist|const UV start|const UV end EiMR |UV* |_invlist_array_init |NN SV* const invlist|const bool will_have_0 EiMR |UV* |invlist_array |NN SV* const invlist EsM |void |invlist_extend |NN SV* const invlist|const UV len @@ -1396,7 +1396,7 @@ EXpM |void |_invlist_invert_prop|NN SV* const invlist EXMpR |HV* |_swash_inversion_hash |NN SV* const swash EXMpR |SV* |_new_invlist |IV initial_size EXMpR |SV* |_swash_to_invlist |NN SV* const swash -EXMp |void |_append_range_to_invlist |NN SV* const invlist|const UV start|const UV end +EXMpR |SV* |_add_range_to_invlist |NULLOK SV* invlist|const UV start|const UV end EXMp |void |_invlist_populate_swatch |NN SV* const invlist|const UV start|const UV end|NN U8* swatch #endif #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) |