This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
inline.h: Return proper value on EBCDIC
authorKarl Williamson <khw@cpan.org>
Wed, 21 Aug 2019 15:14:05 +0000 (09:14 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 21 Aug 2019 15:26:12 +0000 (09:26 -0600)
The final step was missing in the conversion from UTF-EBCDIC to uv.

This adds a macro call that expands to its argument on non-EBCDIC
platforms, so this commit makes no changes to the compiled binary on
those systems.

inline.h

index 67fbf85..cf813ab 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -1835,7 +1835,7 @@ S_utf8n_to_uvchr_msgs(const U8 *s,
             *msgs = NULL;
         }
 
-        return uv;
+        return UNI_TO_NATIVE(uv);
     }
 
     /* Here is potentially problematic.  Use the full mechanism */