*/
STATIC bool
-S_isa_lookup(pTHX_ HV *stash, const char *name, HV* name_stash,
+S_isa_lookup(pTHX_ HV *stash, const char *name, const HV* const name_stash,
int len, int level)
{
dVAR;
/* A stash/class can go by many names (ie. User == main::User), so
we compare the stash itself just in case */
- if (name_stash && (stash == name_stash))
+ if (name_stash && ((const HV *)stash == name_stash))
return TRUE;
hvname = HvNAME_get(stash);
&& (hv = GvHV(gv)))
{
if (SvIV(subgen) == (IV)PL_sub_generation) {
- SV* sv;
SV** const svp = (SV**)hv_fetch(hv, name, len, FALSE);
- if (svp && (sv = *svp) != (SV*)&PL_sv_undef) {
- DEBUG_o( Perl_deb(aTHX_ "Using cached ISA %s for package %s\n",
- name, hvname) );
+ if (svp) {
+ SV * const sv = *svp;
+#ifdef DEBUGGING
+ if (sv != &PL_sv_undef)
+ DEBUG_o( Perl_deb(aTHX_ "Using cached ISA %s for package %s\n",
+ name, hvname) );
+#endif
return (sv == &PL_sv_yes);
}
}
if ( SvNOK(ver) ) /* may get too much accuracy */
{
char tbuf[64];
- const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+#ifdef USE_LOCALE_NUMERIC
+ char *loc = setlocale(LC_NUMERIC, "C");
+#endif
+ STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+#ifdef USE_LOCALE_NUMERIC
+ setlocale(LC_NUMERIC, loc);
+#endif
+ while (tbuf[len-1] == '0' && len > 0) len--;
version = savepvn(tbuf, len);
}
else