summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-12-03 12:34:57 -0700
committerKarl Williamson <khw@cpan.org>2015-12-09 18:55:55 -0700
commitb999256943f4868aefd090587ad36fc6dc85dc27 (patch)
treedf6e630e716a103deb48c44bc883fdca142dd2df /embed.fnc
parent13cf59ef3a5d7ce9151c3cd89631387ed0f5622d (diff)
downloadperl-b999256943f4868aefd090587ad36fc6dc85dc27.tar.gz
utf8.c: Don't throw away a value and then recalc it
In half the calls to to_utf8_case(), the code point being looked up is known. It is thrown away because the API doesn't pass it, and then recalculated first thing in to_utf8_case. Fix this by making a new static function which adds the code point to the parameter list, and change all calls to use this, leaving the existing to_utf8_case() as just a wrapper for the new function.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc9
1 files changed, 9 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index f2b4ccdbcd..f29c810952 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1597,6 +1597,15 @@ Apd |UV |to_utf8_case |NN const U8 *p \
|NN SV **swashp \
|NN const char *normal| \
NULLOK const char *special
+#if defined(PERL_IN_UTF8_C)
+s |UV |_to_utf8_case |const UV uv1 \
+ |NN const U8 *p \
+ |NN U8* ustrp \
+ |NULLOK STRLEN *lenp \
+ |NN SV **swashp \
+ |NN const char *normal \
+ |NULLOK const char *special
+#endif
Abmd |UV |to_utf8_lower |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
AMp |UV |_to_utf8_lower_flags |NN const U8 *p|NN U8* ustrp \
|NULLOK STRLEN *lenp|bool flags