if (ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
"Can't locate package %"SVf" for @%s::ISA",
- sv, hvname);
+ (void*)sv, hvname);
continue;
}
if (isa_lookup(basestash, name, name_stash, len, level + 1)) {
=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 ( vcmp( req, sv ) > 0 )
Perl_croak(aTHX_ "%s version %"SVf" (%"SVf") required--"
- "this is only version %"SVf" (%"SVf")", HvNAME_get(pkg),
- vnumify(req),vnormal(req),vnumify(sv),vnormal(sv));
+ "this is only version %"SVf" (%"SVf")", HvNAME_get(pkg),
+ (void*)vnumify(req),
+ (void*)vnormal(req),
+ (void*)vnumify(sv),
+ (void*)vnormal(sv));
}
if ( SvOK(sv) && sv_derived_from(sv, "version") ) {
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];
- const STRLEN len = my_sprintf(tbuf,"%.9"NVgf, SvNVX(ver));
+ const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
version = savepvn(tbuf, len);
}
else
else {
if (namok && argok)
XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf"(%"SVf")",
- *namsvp, *argsvp));
+ (void*)*namsvp,
+ (void*)*argsvp));
else if (namok)
- XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf, *namsvp));
+ XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf,
+ (void*)*namsvp));
else
XPUSHs(&PL_sv_undef);
nitem++;