STATIC SV *
S_is_an_int(pTHX_ const char *s, STRLEN l)
{
- STRLEN n_a;
SV *result = newSVpvn(s, l);
- char *result_c = SvPV(result, n_a); /* convenience */
+ char *result_c = SvPV_nolen(result); /* convenience */
char *out = result_c;
bool skip = 1;
bool ignore = 0;
/* Fall through! */
case 'p':
while (len-- > 0) {
- char *aptr;
+ const char *aptr;
fromstr = NEXTFROM;
SvGETMAGIC(fromstr);
"Attempt to pack pointer to temporary value");
}
if (SvPOK(fromstr) || SvNIOK(fromstr))
- aptr = SvPV_flags(fromstr, n_a, 0);
+ aptr = SvPV_nomg_const(fromstr, n_a);
else
aptr = SvPV_force_flags(fromstr, n_a, 0);
}
"Field too wide in 'u' format in pack");
len = 63;
}
- aptr = SvPV(fromstr, fromlen);
+ aptr = SvPV_const(fromstr, fromlen);
from_utf8 = DO_UTF8(fromstr);
if (from_utf8) {
aend = aptr + fromlen;