summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-08-31 22:30:11 -0600
committerKarl Williamson <khw@cpan.org>2015-09-02 18:23:39 -0600
commitb5804ad61d2f8076a2596d0fbc58e267d1e5e072 (patch)
treee7b11c638df35ea0538f96b5ff5e2814d720372c /universal.c
parent9ae0115f0b854d654461d3c5bbcaa938516d0f4e (diff)
downloadperl-b5804ad61d2f8076a2596d0fbc58e267d1e5e072.tar.gz
utf8::unicode_to_native() should return UV, not an IV
Same for the native_to_unicode() While it is true that UTF-EBCDIC is limited to a a code point of a maximum of 2**31 - 1, in order for the correct code to execute to catch an attempt at a larger one, it needs to be a UV.
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/universal.c b/universal.c
index 9b34df9753..3217d33280 100644
--- a/universal.c
+++ b/universal.c
@@ -524,7 +524,7 @@ XS(XS_utf8_native_to_unicode)
if (items > 1)
croak_xs_usage(cv, "sv");
- ST(0) = sv_2mortal(newSViv(NATIVE_TO_UNI(uv)));
+ ST(0) = sv_2mortal(newSVuv(NATIVE_TO_UNI(uv)));
XSRETURN(1);
}
@@ -537,7 +537,7 @@ XS(XS_utf8_unicode_to_native)
if (items > 1)
croak_xs_usage(cv, "sv");
- ST(0) = sv_2mortal(newSViv(UNI_TO_NATIVE(uv)));
+ ST(0) = sv_2mortal(newSVuv(UNI_TO_NATIVE(uv)));
XSRETURN(1);
}