This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deprecate NATIVE_TO_NEED and ASCII_TO_NEED
authorKarl Williamson <public@khwilliamson.com>
Wed, 20 Feb 2013 17:39:48 +0000 (10:39 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 29 Aug 2013 15:55:53 +0000 (09:55 -0600)
commit3d81eea60b810797ecb1123661164802c8a1984b
treedf91bff760ad143fce87d29c0edb4d46a76d2a75
parent5ff03569b606b06e31e418f9ef484ed4fc71babc
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.
embed.fnc
mathoms.c
proto.h
toke.c
utf8.h
utfebcdic.h