summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-04-27 22:14:02 -0600
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:56:08 -0600
commitde69f3af3da72e3d0ea0adae070cdb4990d7c9bf (patch)
tree81263c78565876d6828c48f51580bb2a69083a98 /embed.fnc
parentbcb1a2d416c144271685cdf48af52ebbc3f267f8 (diff)
downloadperl-de69f3af3da72e3d0ea0adae070cdb4990d7c9bf.tar.gz
utf8.c: Remove wrapper functions.
Now that the Unicode data is stored in native character set order, it is rare to need to work with the Unicode order. Traditionally, the real work was done in functions that worked with the Unicode order, and wrapper functions (or macros) were used to translate to/from native. There are two groups of functions: one that translates from code point to UTF-8, and the other group goes the opposite direction. This commit changes the base function that translates from UTF-8 to code point to output native instead of Unicode. Those extremely rare instances where Unicode output is needed instead will have to hand-wrap calls to this function with a translation macro, as now described in the API pod. Prior to this, it was the other way, the native was wrapped, and the rare, strict Unicode wasn't. This eliminates a layer of function call overhead for a common case. The base function that translates from code point to UTF-8 retains its Unicode input, as that is more natural to process. However, it is de-emphasized in the pod, with the functionality description moved to the pod for a native input wrapper function. And, those wrappers are now macros in all cases; previously there was function call overhead sometimes. (Equivalent exported functions are retained, however, for XS code that uses the Perl_foo() form.) I had hoped to rebase this commit, squashing it with an earlier commit in this series, eliminating the use of a temporary function name change, but the work involved turns out to be large, with no real payoff.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc16
1 files changed, 3 insertions, 13 deletions
diff --git a/embed.fnc b/embed.fnc
index 5372149771..f18ecb4560 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1543,28 +1543,18 @@ ApMd |U8* |bytes_to_utf8 |NN const U8 *s|NN STRLEN *len
ApdD |UV |utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen
ApdD |UV |utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen
ApMD |UV |valid_utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen
-Apd |UV |utf8_to_uvchr_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+Amd |UV |utf8_to_uvchr_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
ApdD |UV |utf8_to_uvuni_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
pM |bool |check_utf8_print |NN const U8 *s|const STRLEN len
-#ifdef EBCDIC
Adp |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
-#else
-Adpbm |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
-#endif
ApM |UV |valid_utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen
-Adp |UV |utf8n_to_uvoffuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
Ap |UV |utf8n_to_uvuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
-#ifdef EBCDIC
-Apd |U8* |uvchr_to_utf8 |NN U8 *d|UV uv
-#else
-Apdbm |U8* |uvchr_to_utf8 |NN U8 *d|UV uv
-#endif
-
+Adm |U8* |uvchr_to_utf8 |NN U8 *d|UV uv
Ap |U8* |uvuni_to_utf8 |NN U8 *d|UV uv
-Ap |U8* |uvchr_to_utf8_flags |NN U8 *d|UV uv|UV flags
+Adm |U8* |uvchr_to_utf8_flags |NN U8 *d|UV uv|UV flags
Apd |U8* |uvoffuni_to_utf8_flags |NN U8 *d|UV uv|UV flags
Ap |U8* |uvuni_to_utf8_flags |NN U8 *d|UV uv|UV flags
Apd |char* |pv_uni_display |NN SV *dsv|NN const U8 *spv|STRLEN len|STRLEN pvlim|UV flags