=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
*/
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);
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