This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document limitations in PUSHi et al macros and add new mPUSHi et al macros
[perl5.git] / universal.c
index bac641c..6b2214d 100644 (file)
@@ -374,7 +374,11 @@ XS(XS_UNIVERSAL_VERSION)
                    vnumify(req),vnormal(req),vnumify(sv),vnormal(sv));
     }
 
-    ST(0) = vnumify(sv);
+    if ( sv_derived_from(sv, "version") ) {
+       ST(0) = vnumify(sv);
+    } else {
+       ST(0) = sv;
+    }
 
     XSRETURN(1);
 }