summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-06-30 18:27:12 -0600
committerKarl Williamson <khw@cpan.org>2021-08-14 09:44:57 -0600
commit5fd26678bf8c8b48b9fdad829c928780cd445d2e (patch)
treed1e751d5a595c15f4079d320f9bf58fd41d87109 /proto.h
parent27099574415e78f6fc05276c1c8cb07cd825fe35 (diff)
downloadperl-5fd26678bf8c8b48b9fdad829c928780cd445d2e.tar.gz
Improve utf16_to_utf8_reversed()
Instead of destroying the input by first swapping the bytes, this calls a base function with the order to use. The non-reverse function is changed to call the base function with the non-reversed order.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index effb8ea2f2..dc9fff0ef2 100644
--- a/proto.h
+++ b/proto.h
@@ -3999,6 +3999,9 @@ PERL_CALLCONV SV* Perl_upg_version(pTHX_ SV *ver, bool qv);
PERL_CALLCONV U8* Perl_utf16_to_utf8(pTHX_ U8* p, U8 *d, Size_t bytelen, Size_t *newlen);
#define PERL_ARGS_ASSERT_UTF16_TO_UTF8 \
assert(p); assert(d); assert(newlen)
+PERL_CALLCONV U8* Perl_utf16_to_utf8_base(pTHX_ U8* p, U8 *d, Size_t bytelen, Size_t *newlen, const bool high, const bool low);
+#define PERL_ARGS_ASSERT_UTF16_TO_UTF8_BASE \
+ assert(p); assert(d); assert(newlen)
PERL_CALLCONV U8* Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8 *d, Size_t bytelen, Size_t *newlen);
#define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED \
assert(p); assert(d); assert(newlen)