summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-20 10:39:48 -0700
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:55:53 -0600
commit3d81eea60b810797ecb1123661164802c8a1984b (patch)
treedf91bff760ad143fce87d29c0edb4d46a76d2a75 /utf8.h
parent5ff03569b606b06e31e418f9ef484ed4fc71babc (diff)
downloadperl-3d81eea60b810797ecb1123661164802c8a1984b.tar.gz
Deprecate NATIVE_TO_NEED and ASCII_TO_NEED
These macros are no longer called in the Perl core. This commit turns them into functions so that they can use gcc's deprecation facility. I believe these were defective right from the beginning, and I have struggled to understand what's going on. From the name, it appears NATIVE_TO_NEED taks a native byte and turns it into UTF-8 if the appropriate parameter indicates that. But that is impossible to do correctly from that API, as for variant characters, it needs to return two bytes. It could only work correctly if ch is an I8 byte, which isn't native, and hence the name would be wrong. Similar arguments for ASCII_TO_NEED. The function S_append_utf8_from_native_byte(const U8 byte, U8** dest) does what I think NATIVE_TO_NEED intended.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/utf8.h b/utf8.h
index b76f098fe4..f1205a6be5 100644
--- a/utf8.h
+++ b/utf8.h
@@ -122,9 +122,6 @@ END_EXTERN_C
/* Transforms in wide UV chars */
#define UNI_TO_NATIVE(ch) (ch)
#define NATIVE_TO_UNI(ch) (ch)
-/* Transforms in invariant space */
-#define NATIVE_TO_NEED(enc,ch) (ch)
-#define ASCII_TO_NEED(enc,ch) (ch)
/* As there are no translations, avoid the function wrapper */
#define utf8n_to_uvchr utf8n_to_uvuni