summaryrefslogtreecommitdiff
path: root/utfebcdic.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-11-06 09:11:55 -0700
committerKarl Williamson <khw@cpan.org>2015-12-05 22:06:49 -0700
commit4c8cd60559ce65964c5e42f43021ce23dc89819e (patch)
tree1820d5f4f946871e893aa5cd4f422c81e1913d0f /utfebcdic.h
parent6bff35fff38fc88b3e093f077f3c1a157a34d0e7 (diff)
downloadperl-4c8cd60559ce65964c5e42f43021ce23dc89819e.tar.gz
utf8.h, et.al.: Clean up some casts
By making sure the no-op macros cast the output appropriately, we can eliminate the casts that have been added in things that call them
Diffstat (limited to 'utfebcdic.h')
-rw-r--r--utfebcdic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/utfebcdic.h b/utfebcdic.h
index 09defa9bd0..9ab6de4728 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -146,8 +146,8 @@ END_EXTERN_C
#define I8_TO_NATIVE_UTF8(b) (__ASSERT_(FITS_IN_8_BITS(b)) PL_utf2e[(U8)(b)])
/* Transforms in wide UV chars */
-#define NATIVE_TO_UNI(ch) (FITS_IN_8_BITS(ch) ? NATIVE_TO_LATIN1(ch) : (ch))
-#define UNI_TO_NATIVE(ch) (FITS_IN_8_BITS(ch) ? LATIN1_TO_NATIVE(ch) : (ch))
+#define NATIVE_TO_UNI(ch) (FITS_IN_8_BITS(ch) ? NATIVE_TO_LATIN1(ch) : (UV) (ch))
+#define UNI_TO_NATIVE(ch) (FITS_IN_8_BITS(ch) ? LATIN1_TO_NATIVE(ch) : (UV) (ch))
/* How wide can a single UTF-8 encoded character become in bytes. */
/* NOTE: Strictly speaking Perl's UTF-8 should not be called UTF-8 since UTF-8