Fix a syntax error in test
[p5sagit/p5-mst-13.2.git] / universal.c
index 21f2c54..705573e 100644 (file)
@@ -130,9 +130,9 @@ S_isa_lookup(pTHX_ HV *stash, const char *name, HV* name_stash,
 
 =for apidoc sv_derived_from
 
-Returns a boolean indicating whether the SV is derived from the specified
-class.  This is the function that implements C<UNIVERSAL::isa>.  It works
-for class names as well as for objects.
+Returns a boolean indicating whether the SV is derived from the specified class
+I<at the C level>.  To check derivation at the Perl level, call C<isa()> as a
+normal Perl method.
 
 =cut
 */
@@ -415,11 +415,8 @@ XS(XS_version_new)
 
        if ( items == 1 ) {
            /* no parameter provided */
-           if ( sv_isobject(ST(0)) ) {
-               /* copy existing object */
-               vs = ST(0);
-           }
-           else {
+           if ( sv_isobject(ST(0)) )
+           {
                /* create empty object */
                vs = sv_newmortal();
                sv_setpvn(vs,"",0);
@@ -622,11 +619,7 @@ XS(XS_version_qv)
            if ( SvNOK(ver) ) /* may get too much accuracy */
            {
                char tbuf[64];
-#ifdef USE_SNPRINTF
-               const STRLEN len = snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
-#else
-               const STRLEN len = my_sprintf(tbuf, "%.9"NVgf, SvNVX(ver));
-#endif /* #ifdef USE_SNPRINTF  */
+               const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
                version = savepvn(tbuf, len);
            }
            else