summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-05-01 14:23:23 -0600
committerKarl Williamson <khw@cpan.org>2018-06-25 07:33:26 -0600
commit5d4a52b5c68a11bfc97c2e24806993b84a61eade (patch)
tree32adacfa73add58acad66f7a533957d56bd45d11 /utf8.c
parent6928bedc792ff80f0cb915460a7eacae25fa9bdd (diff)
downloadperl-5d4a52b5c68a11bfc97c2e24806993b84a61eade.tar.gz
grok_atoUV: allow non-C strings and document
This changes the internal function grok_atoUV() to not require its input to be NUL-terminated. That means the existing calls to it must be changed to set the ending position before calling it, as some did already. This function is recommended to use in a couple of pods, but it wasn't documented in perlintern. This commit does that as well.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index ec67b08d50..406fb8bdde 100644
--- a/utf8.c
+++ b/utf8.c
@@ -5201,6 +5201,7 @@ Perl__swash_to_invlist(pTHX_ SV* const swash)
/* Get the 0th element, which is needed to setup the inversion list
* */
while (isSPACE(*l)) l++;
+ after_atou = (char *) lend;
if (!grok_atoUV((const char *)l, &element0, &after_atou)) {
Perl_croak(aTHX_ "panic: Expecting a valid 0th element for"
" inversion list");
@@ -5217,6 +5218,7 @@ Perl__swash_to_invlist(pTHX_ SV* const swash)
" elements than available", elements);
}
while (isSPACE(*l)) l++;
+ after_atou = (char *) lend;
if (!grok_atoUV((const char *)l, other_elements_ptr++,
&after_atou))
{