These two code paths, sv_2iv and sv_2uv, used to be shared with gmag-
ical scalars in general, but now only apply to scalars that cannot
hold numeric values and are always SvPOK.
Regexps have no SvIVX and SvNVX fields.
*/
- if (SvIOKp(sv))
- return SvIVX(sv);
- if (SvNOKp(sv))
- return I_V(SvNVX(sv));
- if (SvPOKp(sv)) {
+ assert(SvPOKp(sv));
UV value;
const int numtype
= grok_number(SvPVX_const(sv), SvCUR(sv), &value);
not_a_number(sv);
}
return I_V(Atof(SvPVX_const(sv)));
- }
- if (ckWARN(WARN_UNINITIALIZED))
- report_uninit(sv);
- return 0;
}
if (SvTHINKFIRST(sv)) {
/* FBMs use the space for SvIVX and SvNVX for other purposes, and use
the same flag bit as SVf_IVisUV, so must not let them cache IVs.
Regexps have no SvIVX and SvNVX fields. */
- if (SvIOKp(sv))
- return SvUVX(sv);
- if (SvNOKp(sv))
- return U_V(SvNVX(sv));
- if (SvPOKp(sv)) {
+ assert(SvPOKp(sv));
UV value;
const int numtype
= grok_number(SvPVX_const(sv), SvCUR(sv), &value);
not_a_number(sv);
}
return U_V(Atof(SvPVX_const(sv)));
- }
- if (ckWARN(WARN_UNINITIALIZED))
- report_uninit(sv);
- return 0;
}
if (SvTHINKFIRST(sv)) {