diff options
author | Karl Williamson <khw@cpan.org> | 2018-04-14 22:53:14 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-04-15 11:45:23 -0600 |
commit | 7723e0077ab2970477de35881407f68179022294 (patch) | |
tree | e40b8bd2ad306044e67cd18a33ae8082279aa88b /mathoms.c | |
parent | b6763dcccec0a1fedbc293e6ab6c5b01a33df3dc (diff) | |
download | perl-7723e0077ab2970477de35881407f68179022294.tar.gz |
Move utf8_to_uvchr out of mathoms.c
This function can't be in mathoms because of its use in Devel::PPPort.
I tried fixing that, but the tools just hung, so this commit moves it
back to utf8.c, while still deprecated.
Diffstat (limited to 'mathoms.c')
-rw-r--r-- | mathoms.c | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -1693,36 +1693,6 @@ Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) } /* -=for apidoc utf8_to_uvchr - -Returns the native code point of the first character in the string C<s> -which is assumed to be in UTF-8 encoding; C<retlen> will be set to the -length, in bytes, of that character. - -Some, but not all, UTF-8 malformations are detected, and in fact, some -malformed input could cause reading beyond the end of the input buffer, which -is why this function is deprecated. Use L</utf8_to_uvchr_buf> instead. - -If C<s> points to one of the detected malformations, and UTF8 warnings are -enabled, zero is returned and C<*retlen> is set (if C<retlen> isn't -C<NULL>) to -1. If those warnings are off, the computed value if well-defined (or -the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and C<*retlen> -is set (if C<retlen> isn't NULL) so that (S<C<s> + C<*retlen>>) is the -next possible position in C<s> that could begin a non-malformed character. -See L</utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is returned. - -=cut -*/ - -UV -Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) -{ - PERL_ARGS_ASSERT_UTF8_TO_UVCHR; - - return utf8_to_uvchr_buf(s, s + UTF8_MAXBYTES, retlen); -} - -/* =for apidoc utf8_to_uvuni Returns the Unicode code point of the first character in the string C<s> |