diff options
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/universal.c b/universal.c index 3e14a68bd7..ca69243ca6 100644 --- a/universal.c +++ b/universal.c @@ -405,6 +405,10 @@ XS(XS_utf8_native_to_unicode) { dXSARGS; UV uv = SvUV(ST(0)); + + if (items > 1) + Perl_croak(aTHX_ "Usage: utf8::native_to_unicode(sv)"); + ST(0) = sv_2mortal(newSViv(NATIVE_TO_UNI(uv))); XSRETURN(1); } @@ -413,6 +417,10 @@ XS(XS_utf8_unicode_to_native) { dXSARGS; UV uv = SvUV(ST(0)); + + if (items > 1) + Perl_croak(aTHX_ "Usage: utf8::unicode_to_native(sv)"); + ST(0) = sv_2mortal(newSViv(UNI_TO_NATIVE(uv))); XSRETURN(1); } |