Re: [PATCH 5.6.1] OS2 syslog
[p5sagit/p5-mst-13.2.git] / universal.c
index 3e14a68..75e6c5e 100644 (file)
@@ -305,7 +305,7 @@ XS(XS_UNIVERSAL_VERSION)
 
        if (SvNV(req) > SvNV(sv))
            Perl_croak(aTHX_ "%s version %s required--this is only version %s",
-                 HvNAME(pkg), SvPV(req,len), SvPV(sv,len));
+                      HvNAME(pkg), SvPV_nolen(req), SvPV_nolen(sv));
     }
 
 finish:
@@ -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);
 }