vxs.inc: Disallow multiple args to XS_version_normal
authorFather Chrysostomos <sprout@cpan.org>
Wed, 11 Sep 2013 20:17:59 +0000 (13:17 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 4 Jan 2014 13:10:03 +0000 (05:10 -0800)
Also rename the argument.

This is part of bringing perl and CPAN into synch.

vxs.inc

diff --git a/vxs.inc b/vxs.inc
index b239fad..6f321f1 100644 (file)
--- a/vxs.inc
+++ b/vxs.inc
@@ -274,19 +274,19 @@ XS(XS_version_normal)
 {
      dVAR;
      dXSARGS;
-     if (items < 1)
-        croak_xs_usage(cv, "lobj, ...");
+     if (items != 1)
+        croak_xs_usage(cv, "ver, ...");
      SP -= items;
      {
-         SV *  lobj = ST(0);
+         SV *  ver = ST(0);
 
-         if (sv_isobject(lobj) && sv_derived_from(lobj, "version")) {
-              lobj = SvRV(lobj);
+         if (sv_isobject(ver) && sv_derived_from(ver, "version")) {
+              ver = SvRV(ver);
          }
          else
-              Perl_croak(aTHX_ "lobj is not of type version");
+              Perl_croak(aTHX_ "ver is not of type version");
 
-         mPUSHs(vnormal(lobj));
+         mPUSHs(vnormal(ver));
 
          PUTBACK;
          return;