Apd |STRLEN |is_utf8_char |NN U8 *p
Apd |bool |is_utf8_string |NN U8 *s|STRLEN len
Apd |bool |is_utf8_string_loc|NN U8 *s|STRLEN len|NN U8 **p
-Ap |bool |is_utf8_alnum |NN U8 *p
-Ap |bool |is_utf8_alnumc |NN U8 *p
-Ap |bool |is_utf8_idfirst|NN U8 *p
-Ap |bool |is_utf8_idcont |NN U8 *p
-Ap |bool |is_utf8_alpha |NN U8 *p
-Ap |bool |is_utf8_ascii |NN U8 *p
-Ap |bool |is_utf8_space |NN U8 *p
-Ap |bool |is_utf8_cntrl |NN U8 *p
-Ap |bool |is_utf8_digit |NN U8 *p
-Ap |bool |is_utf8_graph |NN U8 *p
-Ap |bool |is_utf8_upper |NN U8 *p
-Ap |bool |is_utf8_lower |NN U8 *p
-Ap |bool |is_utf8_print |NN U8 *p
-Ap |bool |is_utf8_punct |NN U8 *p
-Ap |bool |is_utf8_xdigit |NN U8 *p
-Ap |bool |is_utf8_mark |NN U8 *p
+ApR |bool |is_utf8_alnum |NN U8 *p
+ApR |bool |is_utf8_alnumc |NN U8 *p
+ApR |bool |is_utf8_idfirst|NN U8 *p
+ApR |bool |is_utf8_idcont |NN U8 *p
+ApR |bool |is_utf8_alpha |NN U8 *p
+ApR |bool |is_utf8_ascii |NN U8 *p
+ApR |bool |is_utf8_space |NN U8 *p
+ApR |bool |is_utf8_cntrl |NN U8 *p
+ApR |bool |is_utf8_digit |NN U8 *p
+ApR |bool |is_utf8_graph |NN U8 *p
+ApR |bool |is_utf8_upper |NN U8 *p
+ApR |bool |is_utf8_lower |NN U8 *p
+ApR |bool |is_utf8_print |NN U8 *p
+ApR |bool |is_utf8_punct |NN U8 *p
+ApR |bool |is_utf8_xdigit |NN U8 *p
+ApR |bool |is_utf8_mark |NN U8 *p
p |OP* |jmaybe |NN OP* arg
pP |I32 |keyword |NN char* d|I32 len
Ap |void |leave_scope |I32 base
pd |PADOFFSET|pad_alloc |I32 optype|U32 tmptype
p |PADOFFSET|allocmy |NN char* name
pd |PADOFFSET|pad_findmy |NN char* name
-p |OP* |oopsAV |NN OP* o
-p |OP* |oopsHV |NN OP* o
+pR |OP* |oopsAV |NN OP* o
+pR |OP* |oopsHV |NN OP* o
pd |void |pad_leavemy
Apd |SV* |pad_sv |PADOFFSET po
pd |void |pad_free |PADOFFSET po
Ap |I32 |regexec_flags |NN regexp* prog|NN char* stringarg \
|NN char* strend|NN char* strbeg|I32 minend \
|SV* screamer|void* data|U32 flags
-Ap |regnode*|regnext |regnode* p
+ApR |regnode*|regnext |NN regnode* p
Ep |void |regprop |SV* sv|regnode* o
Ap |void |repeatcpy |NN char* to|NN const char* from|I32 len|I32 count
ApP |char* |rninstr |NN const char* big|NN const char* bigend \
Apd |I32 |sv_cmp |NN SV* sv1|NN SV* sv2
Apd |I32 |sv_cmp_locale |NN SV* sv1|NN SV* sv2
#if defined(USE_LOCALE_COLLATE)
-Apd |char* |sv_collxfrm |NN SV* sv|STRLEN* nxp
+Apd |char* |sv_collxfrm |NN SV* sv|NN STRLEN* nxp
#endif
Ap |OP* |sv_compile_2op |NN SV* sv|NN OP** startp|NN char* code|NN PAD** padp
Apd |int |getcwd_sv |NN SV* sv
#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
s |void |hsplit |HV *hv
s |void |hfreeentries |HV *hv
-s |HE* |new_he
-s |void |del_he |HE *p
-s |HEK* |save_hek_flags |const char *str|I32 len|U32 hash|int flags
-s |void |hv_magic_check |HV *hv|bool *needs_copy|bool *needs_store
-s |void |unshare_hek_or_pvn|HEK* hek|const char* sv|I32 len|U32 hash
-s |HEK* |share_hek_flags|const char* sv|I32 len|U32 hash|int flags
-rs |void |hv_notallowed |int flags|const char *key|I32 klen|const char *msg
+sR |HE* |new_he
+s |void |del_he |NN HE *p
+sR |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags
+s |void |hv_magic_check |NN HV *hv|NN bool *needs_copy|NN bool *needs_store
+s |void |unshare_hek_or_pvn|HEK* hek|NN const char* sv|I32 len|U32 hash
+sR |HEK* |share_hek_flags|const char* sv|I32 len|U32 hash|int flags
+rs |void |hv_notallowed |int flags|NN const char *key|I32 klen|NN const char *msg
#endif
#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
s |char * |get_num |NN char *ppat|NN I32 *
s |bool |next_symbol |NN tempsym_t* symptr
s |void |doencodes |SV* sv|char* s|I32 len
-s |SV* |is_an_int |NN char *s|STRLEN l
+sR |SV* |is_an_int |NN char *s|STRLEN l
s |int |div128 |NN SV *pnum|NN bool *done
#endif
#endif
END_EXTERN_C
+/*
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */
#define specialsv_list (MY_CXT.x_specialsv_list)
static opclass
-cc_opclass(pTHX_ OP *o)
+cc_opclass(pTHX_ const OP *o)
{
if (!o)
return OPc_NULL;
}
static char *
-cc_opclassname(pTHX_ OP *o)
+cc_opclassname(pTHX_ const OP *o)
{
return opclassnames[cc_opclass(aTHX_ o)];
}
cstring(pTHX_ SV *sv, bool perlstyle)
{
SV *sstr = newSVpvn("", 0);
- STRLEN len;
- char *s;
- char escbuff[5]; /* to fit backslash, 3 octals + trailing \0 */
if (!SvOK(sv))
sv_setpvn(sstr, "0", 1);
- else if (perlstyle && SvUTF8(sv))
- {
+ else if (perlstyle && SvUTF8(sv)) {
SV *tmpsv = sv_newmortal(); /* Temporary SV to feed sv_uni_display */
- len = SvCUR(sv);
- s = sv_uni_display(tmpsv, sv, 8*len, UNI_DISPLAY_QQ);
+ const STRLEN len = SvCUR(sv);
+ const char *s = sv_uni_display(tmpsv, sv, 8*len, UNI_DISPLAY_QQ);
sv_setpvn(sstr,"\"",1);
while (*s)
{
if (*s == '"')
- sv_catpv(sstr, "\\\"");
+ sv_catpvn(sstr, "\\\"", 2);
else if (*s == '$')
- sv_catpv(sstr, "\\$");
+ sv_catpvn(sstr, "\\$", 2);
else if (*s == '@')
- sv_catpv(sstr, "\\@");
+ sv_catpvn(sstr, "\\@", 2);
else if (*s == '\\')
{
if (strchr("nrftax\\",*(s+1)))
sv_catpvn(sstr, s++, 2);
else
- sv_catpv(sstr, "\\\\");
+ sv_catpvn(sstr, "\\\\", 2);
}
else /* should always be printable */
sv_catpvn(sstr, s, 1);
else
{
/* XXX Optimise? */
- s = SvPV(sv, len);
+ STRLEN len;
+ const char *s = SvPV(sv, len);
sv_catpv(sstr, "\"");
for (; len; len--, s++)
{
else if (*s == '\\')
sv_catpv(sstr, "\\\\");
/* trigraphs - bleagh */
- else if (!perlstyle && *s == '?' && len>=3 && s[1] == '?')
- {
+ else if (!perlstyle && *s == '?' && len>=3 && s[1] == '?') {
+ char escbuff[5]; /* to fit backslash, 3 octals + trailing \0 */
sprintf(escbuff, "\\%03o", '?');
sv_catpv(sstr, escbuff);
}
else
{
/* Don't want promotion of a signed -1 char in sprintf args */
- unsigned char c = (unsigned char) *s;
+ char escbuff[5]; /* to fit backslash, 3 octals + trailing \0 */
+ const unsigned char c = (unsigned char) *s;
sprintf(escbuff, "\\%03o", c);
sv_catpv(sstr, escbuff);
}
cchar(pTHX_ SV *sv)
{
SV *sstr = newSVpvn("'", 1);
- STRLEN n_a;
- char *s = SvPV(sv, n_a);
+ const char *s = SvPV_nolen(sv);
if (*s == '\'')
- sv_catpv(sstr, "\\'");
+ sv_catpvn(sstr, "\\'", 2);
else if (*s == '\\')
- sv_catpv(sstr, "\\\\");
+ sv_catpvn(sstr, "\\\\", 2);
#ifdef EBCDIC
else if (isPRINT(*s))
#else
#endif /* EBCDIC */
sv_catpvn(sstr, s, 1);
else if (*s == '\n')
- sv_catpv(sstr, "\\n");
+ sv_catpvn(sstr, "\\n", 2);
else if (*s == '\r')
- sv_catpv(sstr, "\\r");
+ sv_catpvn(sstr, "\\r", 2);
else if (*s == '\t')
- sv_catpv(sstr, "\\t");
+ sv_catpvn(sstr, "\\t", 2);
else if (*s == '\a')
- sv_catpv(sstr, "\\a");
+ sv_catpvn(sstr, "\\a", 2);
else if (*s == '\b')
- sv_catpv(sstr, "\\b");
+ sv_catpvn(sstr, "\\b", 2);
else if (*s == '\f')
- sv_catpv(sstr, "\\f");
+ sv_catpvn(sstr, "\\f", 2);
else if (*s == '\v')
- sv_catpv(sstr, "\\v");
+ sv_catpvn(sstr, "\\v", 2);
else
{
/* no trigraph support */
sprintf(escbuff, "\\%03o", c);
sv_catpv(sstr, escbuff);
}
- sv_catpv(sstr, "'");
+ sv_catpvn(sstr, "'", 1);
return sstr;
}
-void
-walkoptree(pTHX_ SV *opsv, char *method)
+static void
+walkoptree(pTHX_ SV *opsv, const char *method)
{
dSP;
OP *o, *kid;
}
}
-SV **
+static SV **
oplist(pTHX_ OP *o, SV **SP)
{
for(; o; o = o->op_next) {
void
walkoptree(opsv, method)
SV * opsv
- char * method
+ const char * method
CODE:
walkoptree(aTHX_ opsv, method);
void
opnumber(name)
-char * name
+const char * name
CODE:
{
int i;
hash(sv)
SV * sv
CODE:
- char *s;
STRLEN len;
U32 hash = 0;
char hexhash[19]; /* must fit "0xffffffffffffffff" plus trailing \0 */
- s = SvPV(sv, len);
+ const char *s = SvPV(sv, len);
PERL_HASH(hash, s, len);
sprintf(hexhash, "0x%"UVxf, (UV)hash);
ST(0) = sv_2mortal(newSVpv(hexhash, 0));
#if PERL_VERSION <= 8
# ifdef USE_5005THREADS
int i;
- STRLEN len = strlen(PL_threadsv_names);
+ const STRLEN len = strlen(PL_threadsv_names);
EXTEND(sp, len);
for (i = 0; i < len; i++)
(o->op_private & OPpTRANS_COMPLEMENT) &&
!(o->op_private & OPpTRANS_DELETE))
{
- short* tbl = (short*)o->op_pv;
- short entries = 257 + tbl[256];
+ const short* const tbl = (short*)o->op_pv;
+ const short entries = 257 + tbl[256];
ST(0) = sv_2mortal(newSVpv(o->op_pv, entries * sizeof(short)));
}
else if (o->op_type == OP_TRANS) {
CODE:
if (sizeof(IV) == 8) {
U32 wp[2];
- IV iv = SvIVX(sv);
+ const IV iv = SvIVX(sv);
/*
* The following way of spelling 32 is to stop compilers on
* 32-bit architectures from moaning about the shift count
bool
IsSTD(io,name)
B::IO io
- char* name
+ const char* name
PREINIT:
PerlIO* handle = 0;
CODE:
static SV *new_opset (pTHX_ SV *old_opset);
static int verify_opset (pTHX_ SV *opset, int fatal);
-static void set_opset_bits (pTHX_ char *bitmap, SV *bitspec, int on, char *opname);
-static void put_op_bitspec (pTHX_ char *optag, STRLEN len, SV *opset);
-static SV *get_op_bitspec (pTHX_ char *opname, STRLEN len, int fatal);
+static void set_opset_bits (pTHX_ char *bitmap, SV *bitspec, int on, const char *opname);
+static void put_op_bitspec (pTHX_ const char *optag, STRLEN len, SV *opset);
+static SV *get_op_bitspec (pTHX_ const char *opname, STRLEN len, int fatal);
/* Initialise our private op_named_bits HV.
op_named_bits = newHV();
op_names = get_op_names();
for(i=0; i < PL_maxo; ++i) {
- SV *sv;
- sv = newSViv(i);
+ SV * const sv = newSViv(i);
SvREADONLY_on(sv);
hv_store(op_named_bits, op_names[i], strlen(op_names[i]), sv, 0);
}
*/
static void
-put_op_bitspec(pTHX_ char *optag, STRLEN len, SV *mask)
+put_op_bitspec(pTHX_ const char *optag, STRLEN len, SV *mask)
{
SV **svp;
dMY_CXT;
*/
static SV *
-get_op_bitspec(pTHX_ char *opname, STRLEN len, int fatal)
+get_op_bitspec(pTHX_ const char *opname, STRLEN len, int fatal)
{
SV **svp;
dMY_CXT;
static int
verify_opset(pTHX_ SV *opset, int fatal)
{
- char *err = Nullch;
+ const char *err = Nullch;
dMY_CXT;
if (!SvOK(opset)) err = "undefined";
static void
-set_opset_bits(pTHX_ char *bitmap, SV *bitspec, int on, char *opname)
+set_opset_bits(pTHX_ char *bitmap, SV *bitspec, int on, const char *opname)
{
dMY_CXT;
if (SvIOK(bitspec)) {
- int myopcode = SvIV(bitspec);
- int offset = myopcode >> 3;
- int bit = myopcode & 0x07;
+ const int myopcode = SvIV(bitspec);
+ const int offset = myopcode >> 3;
+ const int bit = myopcode & 0x07;
if (myopcode >= PL_maxo || myopcode < 0)
croak("panic: opcode \"%s\" value %d is invalid", opname, myopcode);
if (opcode_debug >= 2)
else if (SvPOK(bitspec) && SvCUR(bitspec) == (STRLEN)opset_len) {
STRLEN len;
- char *specbits = SvPV(bitspec, len);
+ const char * const specbits = SvPV(bitspec, len);
if (opcode_debug >= 2)
warn("set_opset_bits opset %s %s\n", opname, (on)?"on":"off");
if (on)
bitmask = SvPV(opset, len);
for (i=0; i < opset_len; i++) {
- U16 bits = bitmask[i];
+ const U16 bits = bitmask[i];
if (!bits) { /* optimise for sparse masks */
myopcode += 8;
continue;
void
_safe_pkg_prep(Package)
- char * Package
+ const char *Package
PPCODE:
HV *hv;
ENTER;
{
STRLEN len;
int i, j, myopcode;
- char *bitmap = SvPV(opset, len);
+ const char * const bitmap = SvPV(opset, len);
char **names = (desc) ? get_op_descs() : get_op_names();
dMY_CXT;
verify_opset(aTHX_ opset,1);
for (myopcode=0, i=0; i < opset_len; i++) {
- U16 bits = bitmap[i];
+ const U16 bits = bitmap[i];
for (j=0; j < 8 && myopcode < PL_maxo; j++, myopcode++) {
if ( bits & (1 << j) )
XPUSHs(sv_2mortal(newSVpv(names[myopcode], 0)));
opset(...)
CODE:
int i;
- SV *bitspec, *opset;
- char *bitmap;
+ SV *bitspec;
STRLEN len, on;
- opset = sv_2mortal(new_opset(aTHX_ Nullsv));
- bitmap = SvPVX(opset);
+ SV * const opset = sv_2mortal(new_opset(aTHX_ Nullsv));
+ char * const bitmap = SvPVX(opset);
for (i = 0; i < items; i++) {
- char *opname;
+ const char *opname;
on = 1;
if (verify_opset(aTHX_ ST(i),0)) {
opname = "(opset)";
deny_only = 2
deny = 3
CODE:
- int i, on;
+ int i;
SV *bitspec, *mask;
- char *bitmap, *opname;
+ char *bitmap;
STRLEN len;
dMY_CXT;
verify_opset(aTHX_ mask,1); /* croaks */
bitmap = SvPVX(mask);
for (i = 1; i < items; i++) {
- on = PERMITING ? 0 : 1; /* deny = mask bit on */
+ const char *opname;
+ int on = PERMITING ? 0 : 1; /* deny = mask bit on */
if (verify_opset(aTHX_ ST(i),0)) { /* it's a valid mask */
opname = "(opset)";
bitspec = ST(i);
void
opdesc(...)
PPCODE:
- int i, myopcode;
+ int i;
STRLEN len;
SV **args;
char **op_desc = get_op_descs();
/* the stack faster than we read values off it if masks are used. */
args = (SV**)SvPVX(sv_2mortal(newSVpvn((char*)&ST(0), items*sizeof(SV*))));
for (i = 0; i < items; i++) {
- char *opname = SvPV(args[i], len);
+ const char * const opname = SvPV(args[i], len);
SV *bitspec = get_op_bitspec(aTHX_ opname, len, 1);
if (SvIOK(bitspec)) {
- myopcode = SvIV(bitspec);
+ const int myopcode = SvIV(bitspec);
if (myopcode < 0 || myopcode >= PL_maxo)
croak("panic: opcode %d (%s) out of range",myopcode,opname);
XPUSHs(sv_2mortal(newSVpv(op_desc[myopcode], 0)));
else if (SvPOK(bitspec) && SvCUR(bitspec) == (STRLEN)opset_len) {
int b, j;
STRLEN n_a;
- char *bitmap = SvPV(bitspec,n_a);
- myopcode = 0;
+ const char * const bitmap = SvPV(bitspec,n_a);
+ int myopcode = 0;
for (b=0; b < opset_len; b++) {
- U16 bits = bitmap[b];
+ const U16 bits = bitmap[b];
for (j=0; j < 8 && myopcode < PL_maxo; j++, myopcode++)
if (bits & (1 << j))
XPUSHs(sv_2mortal(newSVpv(op_desc[myopcode], 0)));
SV *mask
CODE:
STRLEN len;
- char *optag = SvPV(optagsv, len);
+ const char *optag = SvPV(optagsv, len);
put_op_bitspec(aTHX_ optag, len, mask); /* croaks */
ST(0) = &PL_sv_yes;
CODE:
ST(0) = sv_2mortal(new_opset(aTHX_ Nullsv));
if (PL_op_mask) {
- char *bitmap = SvPVX(ST(0));
+ char * const bitmap = SvPVX(ST(0));
int myopcode;
for(myopcode=0; myopcode < PL_maxo; ++myopcode) {
if (PL_op_mask[myopcode])
#include "XSUB.h"
static cv_flags_t
-get_flag(char *attr)
+get_flag(const char *attr)
{
if (strnEQ(attr, "method", 6))
return CVf_METHOD;
"pragma \"attrs\" is deprecated, "
"use \"sub NAME : ATTRS\" instead");
for (i = 1; i < items; i++) {
- STRLEN n_a;
- char *attr = SvPV(ST(i), n_a);
- cv_flags_t flag = get_flag(attr);
+ const char * const attr = SvPV_nolen(ST(i));
+ const cv_flags_t flag = get_flag(attr);
if (!flag)
croak("invalid attribute name %s", attr);
if (ix)
sub = Nullsv;
}
else {
- STRLEN n_a;
- char *name = SvPV(sub, n_a);
+ const char * const name = SvPV_nolen(sub);
sub = (SV*)perl_get_cv(name, FALSE);
}
if (!sub)
}
else if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) {
/* already defined (or promised) */
+ /* XXX It's possible for this HvNAME_get to return null, and get passed into strEQ */
if (ckWARN(WARN_REDEFINE) && !(CvGV(cv) && GvSTASH(CvGV(cv))
&& strEQ(HvNAME_get(GvSTASH(CvGV(cv))), "autouse"))) {
const line_t oldline = CopLINE(PL_curcop);
|| o->op_type == OP_BIT_AND
|| o->op_type == OP_BIT_XOR))
{
- const OP * left = cBINOPo->op_first;
- const OP * right = left->op_sibling;
+ const OP * const left = cBINOPo->op_first;
+ const OP * const right = left->op_sibling;
if ((OP_IS_NUMCOMPARE(left->op_type) &&
(left->op_flags & OPf_PARENS) == 0) ||
(OP_IS_NUMCOMPARE(right->op_type) &&
*/
# error "Don't know how to set FILE.fileno on your platform"
#endif
+ (void)f;
return 0;
# endif
}
STATIC int
S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
{
+ (void)path;
+ (void)mode;
Perl_croak(aTHX_ "switching effective uid is not implemented");
/*NOTREACHED*/
return -1;
HV* stash;
GV *gv;
SV *sv;
- I32 markoff = MARK - PL_stack_base;
+ const I32 markoff = MARK - PL_stack_base;
const char *methname;
int how = PERL_MAGIC_tied;
U32 items;
dSP;
MAGIC *mg;
SV *sv = POPs;
- char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
+ const char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar;
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
dSP;
MAGIC *mg;
SV *sv = POPs;
- char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
+ const char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar;
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
PP(pp_select)
{
dSP; dTARGET;
- GV *newdefout, *egv;
+ GV *egv;
HV *hv;
- newdefout = (PL_op->op_private > 0) ? ((GV *) POPs) : (GV *) NULL;
+ GV * const newdefout = (PL_op->op_private > 0) ? ((GV *) POPs) : (GV *) NULL;
egv = GvEGV(PL_defoutgv);
if (!egv)
cv = GvFORM(fgv);
if (!cv) {
- char *name = NULL;
if (fgv) {
- SV *tmpsv = sv_newmortal();
+ SV * const tmpsv = sv_newmortal();
+ char *name;
gv_efullname4(tmpsv, fgv, Nullch, FALSE);
name = SvPV_nolen(tmpsv);
+ if (name && *name)
+ DIE(aTHX_ "Undefined format \"%s\" called", name);
}
- if (name && *name)
- DIE(aTHX_ "Undefined format \"%s\" called", name);
DIE(aTHX_ "Not a format reference");
}
if (CvCLONE(cv))
if (!fgv)
DIE(aTHX_ "bad top format reference");
cv = GvFORM(fgv);
- {
- char *name = NULL;
- if (!cv) {
- SV *sv = sv_newmortal();
- gv_efullname4(sv, fgv, Nullch, FALSE);
- name = SvPV_nolen(sv);
- }
+ if (!cv) {
+ SV * const sv = sv_newmortal();
+ char *name;
+ gv_efullname4(sv, fgv, Nullch, FALSE);
+ name = SvPV_nolen(sv);
if (name && *name)
- DIE(aTHX_ "Undefined top format \"%s\" called",name);
- /* why no:
- else
- DIE(aTHX_ "Undefined top format called");
- ?*/
+ DIE(aTHX_ "Undefined top format \"%s\" called",name);
}
+ /* why no:
+ else
+ DIE(aTHX_ "Undefined top format called");
+ ?*/
if (CvCLONE(cv))
cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
return doform(cv,gv,PL_op);
SV *sv;
char *tmps;
STRLEN len;
- int mode, perm;
+ const int perm = (MAXARG > 3) ? POPi : 0666;
+ const int mode = POPi;
- if (MAXARG > 3)
- perm = POPi;
- else
- perm = 0666;
- mode = POPi;
sv = POPs;
gv = (GV *)POPs;
(void)SvPOK_only(read_target);
if (fp_utf8 && !IN_BYTES) {
/* Look at utf8 we got back and count the characters */
- char *bend = buffer + count;
+ const char *bend = buffer + count;
while (buffer < bend) {
if (charstart) {
skip = UTF8SKIP(buffer);
PP(pp_syswrite)
{
dSP;
- int items = (SP - PL_stack_base) - TOPMARK;
+ const int items = (SP - PL_stack_base) - TOPMARK;
if (items == 2) {
SV *sv;
EXTEND(SP, 1);
}
#ifdef HAS_SOCKET
else if (SP > MARK) {
- char *sockbuf;
STRLEN mlen;
- sockbuf = SvPVx(*++MARK, mlen);
+ char * const sockbuf = SvPVx(*++MARK, mlen);
/* length is really flags */
retval = PerlSock_sendto(PerlIO_fileno(IoIFP(io)), buffer, blen,
length, (struct sockaddr *)sockbuf, mlen);
dSP;
GV *gv;
IO *io;
- int whence = POPi;
+ const int whence = POPi;
#if LSEEKSIZE > IVSIZE
Off_t offset = (Off_t)SvNVx(POPs);
#else
{
dSP; dTARGET;
SV *argsv = POPs;
- unsigned int func = POPu;
+ const unsigned int func = POPu;
const int optype = PL_op->op_type;
char *s;
IV retval;
__attribute__nonnull__(pTHX_3);
PERL_CALLCONV bool Perl_is_utf8_alnum(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_alnumc(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_idfirst(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_idcont(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_alpha(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_ascii(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_space(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_cntrl(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_digit(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_graph(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_upper(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_lower(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_print(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_punct(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_xdigit(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV bool Perl_is_utf8_mark(pTHX_ U8 *p)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV OP* Perl_jmaybe(pTHX_ OP* arg)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV OP* Perl_oopsAV(pTHX_ OP* o)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV OP* Perl_oopsHV(pTHX_ OP* o)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV void Perl_pad_leavemy(pTHX);
__attribute__nonnull__(pTHX_3)
__attribute__nonnull__(pTHX_4);
-PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p);
+PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
PERL_CALLCONV void Perl_regprop(pTHX_ SV* sv, regnode* o);
PERL_CALLCONV void Perl_repeatcpy(pTHX_ char* to, const char* from, I32 len, I32 count)
__attribute__nonnull__(pTHX_1)
#if defined(USE_LOCALE_COLLATE)
PERL_CALLCONV char* Perl_sv_collxfrm(pTHX_ SV* sv, STRLEN* nxp)
- __attribute__nonnull__(pTHX_1);
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
#endif
PERL_CALLCONV OP* Perl_sv_compile_2op(pTHX_ SV* sv, OP** startp, char* code, PAD** padp)
#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
STATIC void S_hsplit(pTHX_ HV *hv);
STATIC void S_hfreeentries(pTHX_ HV *hv);
-STATIC HE* S_new_he(pTHX);
-STATIC void S_del_he(pTHX_ HE *p);
-STATIC HEK* S_save_hek_flags(pTHX_ const char *str, I32 len, U32 hash, int flags);
-STATIC void S_hv_magic_check(pTHX_ HV *hv, bool *needs_copy, bool *needs_store);
-STATIC void S_unshare_hek_or_pvn(pTHX_ HEK* hek, const char* sv, I32 len, U32 hash);
-STATIC HEK* S_share_hek_flags(pTHX_ const char* sv, I32 len, U32 hash, int flags);
+STATIC HE* S_new_he(pTHX)
+ __attribute__warn_unused_result__;
+
+STATIC void S_del_he(pTHX_ HE *p)
+ __attribute__nonnull__(pTHX_1);
+
+STATIC HEK* S_save_hek_flags(pTHX_ const char *str, I32 len, U32 hash, int flags)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+STATIC void S_hv_magic_check(pTHX_ HV *hv, bool *needs_copy, bool *needs_store)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
+
+STATIC void S_unshare_hek_or_pvn(pTHX_ HEK* hek, const char* sv, I32 len, U32 hash)
+ __attribute__nonnull__(pTHX_2);
+
+STATIC HEK* S_share_hek_flags(pTHX_ const char* sv, I32 len, U32 hash, int flags)
+ __attribute__warn_unused_result__;
+
STATIC void S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen, const char *msg)
- __attribute__noreturn__;
+ __attribute__noreturn__
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_4);
#endif
STATIC void S_doencodes(pTHX_ SV* sv, char* s, I32 len);
STATIC SV* S_is_an_int(pTHX_ char *s, STRLEN l)
+ __attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
STATIC int S_div128(pTHX_ SV *pnum, bool *done)
#endif
END_EXTERN_C
+/*
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */
/* ex: set ro: */
void
Perl_reginitcolors(pTHX)
{
- int i = 0;
- char *s = PerlEnv_getenv("PERL_RE_COLORS");
-
+ const char * const s = PerlEnv_getenv("PERL_RE_COLORS");
if (s) {
- PL_colors[0] = s = savepv(s);
+ char *t = savepv(s);
+ int i = 0;
+ PL_colors[0] = t;
while (++i < 6) {
- s = strchr(s, '\t');
- if (s) {
- *s = '\0';
- PL_colors[i] = ++s;
+ t = strchr(t, '\t');
+ if (t) {
+ *t = '\0';
+ PL_colors[i] = ++t;
}
else
- PL_colors[i] = s = (char *)"";
+ PL_colors[i] = t = (char *)"";
}
} else {
+ int i = 0;
while (i < 6)
PL_colors[i++] = (char *)"";
}
!(r->reganch & ROPT_ANCH) )
{
/* turn .* into ^.* with an implied $*=1 */
- int type = OP(NEXTOPER(first));
-
- if (type == REG_ANY)
- type = ROPT_ANCH_MBOL;
- else
- type = ROPT_ANCH_SBOL;
-
+ const int type =
+ (OP(NEXTOPER(first)) == REG_ANY)
+ ? ROPT_ANCH_MBOL
+ : ROPT_ANCH_SBOL;
r->reganch |= type | ROPT_IMPLICIT;
first = NEXTOPER(first);
goto again;
&& !(data.start_class->flags & ANYOF_EOS)
&& !cl_is_anything(data.start_class))
{
- I32 n = add_data(pRExC_state, 1, "f");
+ const I32 n = add_data(pRExC_state, 1, "f");
New(1006, RExC_rx->data->data[n], 1,
struct regnode_charclass_class);
if (!(data.start_class->flags & ANYOF_EOS)
&& !cl_is_anything(data.start_class))
{
- I32 n = add_data(pRExC_state, 1, "f");
+ const I32 n = add_data(pRExC_state, 1, "f");
New(1006, RExC_rx->data->data[n], 1,
struct regnode_charclass_class);
register char op;
register char *next;
I32 flags;
- char *origparse = RExC_parse;
+ const char * const origparse = RExC_parse;
char *maxpos;
I32 min;
I32 max = REG_INFTY;
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- I32 num = atoi(RExC_parse);
+ const I32 num = atoi(RExC_parse);
if (num > 9 && num >= RExC_npar)
goto defchar;
register UV ender;
register char *p;
char *oldp, *s;
- STRLEN numlen;
STRLEN foldlen;
U8 tmpbuf[UTF8_MAXBYTES_CASE+1], *foldbuf;
break;
case 'x':
if (*++p == '{') {
- char* e = strchr(p, '}');
+ char* const e = strchr(p, '}');
if (!e) {
RExC_parse = p + 1;
else {
I32 flags = PERL_SCAN_ALLOW_UNDERSCORES
| PERL_SCAN_DISALLOW_PREFIX;
- numlen = e - p - 1;
+ STRLEN numlen = e - p - 1;
ender = grok_hex(p + 1, &numlen, &flags, NULL);
if (ender > 0xff)
RExC_utf8 = 1;
}
else {
I32 flags = PERL_SCAN_DISALLOW_PREFIX;
- numlen = 2;
+ STRLEN numlen = 2;
ender = grok_hex(p, &numlen, &flags, NULL);
p += numlen;
}
if (*p == '0' ||
(isDIGIT(p[1]) && atoi(p) >= RExC_npar) ) {
I32 flags = 0;
- numlen = 3;
+ STRLEN numlen = 3;
ender = grok_oct(p, &numlen, &flags, NULL);
p += numlen;
}
default:
normal_default:
if (UTF8_IS_START(*p) && UTF) {
+ STRLEN numlen;
ender = utf8n_to_uvchr((U8*)p, RExC_end - p,
&numlen, 0);
p += numlen;
if (FOLD) {
/* Emit all the Unicode characters. */
+ STRLEN numlen;
for (foldbuf = tmpbuf;
foldlen;
foldlen -= numlen) {
if (FOLD) {
/* Emit all the Unicode characters. */
+ STRLEN numlen;
for (foldbuf = tmpbuf;
foldlen;
foldlen -= numlen) {
if (RExC_utf8)
SvUTF8_on(sv);
if (sv_utf8_downgrade(sv, TRUE)) {
- char *s = sv_recode_to_utf8(sv, PL_encoding);
- STRLEN newlen = SvCUR(sv);
+ const char * const s = sv_recode_to_utf8(sv, PL_encoding);
+ const STRLEN newlen = SvCUR(sv);
if (SvUTF8(sv))
RExC_utf8 = 1;
if (value == '[' && RExC_parse + 1 < RExC_end &&
/* I smell either [: or [= or [. -- POSIX has been here, right? */
POSIXCC(UCHARAT(RExC_parse))) {
- char c = UCHARAT(RExC_parse);
+ const char c = UCHARAT(RExC_parse);
char* s = RExC_parse++;
while (RExC_parse < RExC_end && UCHARAT(RExC_parse) != c)
/* Grandfather lone [:, [=, [. */
RExC_parse = s;
else {
- char* t = RExC_parse++; /* skip over the c */
+ const char* t = RExC_parse++; /* skip over the c */
assert(*t == c);
RExC_parse++; /* skip over the ending ] */
posixcc = s + 1;
if (*s == ':') {
- I32 complement = *posixcc == '^' ? *posixcc++ : 0;
- I32 skip = t - posixcc;
+ const I32 complement = *posixcc == '^' ? *posixcc++ : 0;
+ const I32 skip = t - posixcc;
/* Initially switch on the length of the name. */
switch (skip) {
S_checkposixcc(pTHX_ RExC_state_t *pRExC_state)
{
if (!SIZE_ONLY && POSIXCC(UCHARAT(RExC_parse))) {
- char *s = RExC_parse;
- char c = *s++;
+ const char *s = RExC_parse;
+ const char c = *s++;
while(*s && isALNUM(*s))
s++;
if (RExC_parse >= RExC_end)
vFAIL2("Empty \\%c{}", (U8)value);
if (*RExC_parse == '{') {
- U8 c = (U8)value;
+ const U8 c = (U8)value;
e = strchr(RExC_parse++, '}');
if (!e)
vFAIL2("Missing right brace on \\%c{}", c);
IV i;
if (prevvalue < 256) {
- IV ceilvalue = value < 256 ? value : 255;
+ const IV ceilvalue = value < 256 ? value : 255;
#ifdef EBCDIC
/* In EBCDIC [\x89-\x91] should include
ANYOF_BITMAP_SET(ret, i);
}
if (value > 255 || UTF) {
- UV prevnatvalue = NATIVE_TO_UNI(prevvalue);
- UV natvalue = NATIVE_TO_UNI(value);
+ const UV prevnatvalue = NATIVE_TO_UNI(prevvalue);
+ const UV natvalue = NATIVE_TO_UNI(value);
ANYOF_FLAGS(ret) |= ANYOF_UNICODE;
if (prevnatvalue < natvalue) { /* what about > ? */
if (FOLD) {
U8 foldbuf[UTF8_MAXBYTES_CASE+1];
STRLEN foldlen;
- UV f = to_uni_fold(natvalue, foldbuf, &foldlen);
+ const UV f = to_uni_fold(natvalue, foldbuf, &foldlen);
/* If folding and foldable and a single
* character, insert also the folded version
/* Using is_utf8_string() is a crude hack but it may
* be the best for now since we have no flag "this EXACTish
* node was UTF-8" --jhi */
- bool do_utf8 = is_utf8_string((U8*)STRING(o), STR_LEN(o));
- char *s = do_utf8 ?
+ const bool do_utf8 = is_utf8_string((U8*)STRING(o), STR_LEN(o));
+ const char *s = do_utf8 ?
pv_uni_display(dsv, (U8*)STRING(o), STR_LEN(o), 60,
UNI_DISPLAY_REGEX) :
STRING(o);
U8 s[UTF8_MAXBYTES_CASE+1];
for (i = 0; i <= 256; i++) { /* just the first 256 */
- U8 *e = uvchr_to_utf8(s, i);
+ uvchr_to_utf8(s, i);
if (i < 256 && swash_fetch(sw, s, TRUE)) {
if (rangestart == -1)
if (i <= rangestart + 3)
for (; rangestart < i; rangestart++) {
+ U8 *e;
for(e = uvchr_to_utf8(s, rangestart), p = s; p < e; p++)
put_byte(sv, *p);
}
else {
+ U8 *e;
for (e = uvchr_to_utf8(s, rangestart), p = s; p < e; p++)
put_byte(sv, *p);
sv_catpv(sv, "-");
- for (e = uvchr_to_utf8(s, i - 1), p = s; p < e; p++)
- put_byte(sv, *p);
+ for (e = uvchr_to_utf8(s, i - 1), p = s; p < e; p++)
+ put_byte(sv, *p);
}
rangestart = -1;
}
while(*s && *s != '\n') s++;
if (*s == '\n') {
- char *t = ++s;
+ const char *t = ++s;
while (*s) {
if (*s == '\n')
{
/* Save $1..$n (#18107: UTF-8 s/(\w+)/uc($1)/e); AMS 20021106. */
- U32 i;
- GV *mgv;
REGEXP *rx;
- char digits[TYPE_CHARS(long)];
if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
+ U32 i;
for (i = 1; i <= rx->nparens; i++) {
+ GV *mgv;
+ char digits[TYPE_CHARS(long)];
sprintf(digits, "%lu", (long)i);
if ((mgv = gv_fetchpv(digits, FALSE, SVt_PV)))
save_scalar(mgv);
I32 i;
U32 paren = 0;
char *input;
- I32 tmps;
/* Pop REGCP_OTHER_ELEMS before the parentheses loop starts. */
i = SSPOPINT;
/* Now restore the parentheses context. */
for (i -= (REGCP_OTHER_ELEMS - REGCP_FRAME_ELEMS);
i > 0; i -= REGCP_PAREN_ELEMS) {
+ I32 tmps;
paren = (U32)SSPOPINT;
PL_reg_start_tmp[paren] = (char *) SSPOPPTR;
PL_regstartp[paren] = SSPOPINT;
}
DEBUG_r({
- char *s = PL_reg_match_utf8 ?
+ const char *s = PL_reg_match_utf8 ?
sv_uni_display(dsv, sv, 60, UNI_DISPLAY_REGEX) :
strpos;
- int len = PL_reg_match_utf8 ?
+ const int len = PL_reg_match_utf8 ?
strlen(s) : strend - strpos;
if (!PL_colorset)
reginitcolors();
STATIC char *
S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, const char *strend, I32 norun)
{
- I32 doevery = (prog->reganch & ROPT_SKIP) == 0;
+ const I32 doevery = (prog->reganch & ROPT_SKIP) == 0;
char *m;
STRLEN ln;
STRLEN lnc;
if (do_utf8) {
UV c, f;
U8 tmpbuf [UTF8_MAXBYTES+1];
- U8 foldbuf[UTF8_MAXBYTES_CASE+1];
STRLEN len, foldlen;
if (c1 == c2) {
&& (norun || regtry(prog, s)) )
goto got_it;
else {
+ U8 foldbuf[UTF8_MAXBYTES_CASE+1];
uvchr_to_utf8(tmpbuf, c);
f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
if ( f != c
&& (norun || regtry(prog, s)) )
goto got_it;
else {
+ U8 foldbuf[UTF8_MAXBYTES_CASE+1];
uvchr_to_utf8(tmpbuf, c);
f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
if ( f != c
register char *startpos = stringarg;
I32 minlen; /* must match at least this many chars */
I32 dontbother = 0; /* how many characters not to try at end */
- /* I32 start_shift = 0; */ /* Offset of the start to find
- constant substr. */ /* CC */
I32 end_shift = 0; /* Same for the end. */ /* CC */
I32 scream_pos = -1; /* Internal iterator of scream. */
char *scream_olds;
SV* oreplsv = GvSV(PL_replgv);
- bool do_utf8 = DO_UTF8(sv);
+ const bool do_utf8 = DO_UTF8(sv);
#ifdef DEBUGGING
SV *dsv0 = PERL_DEBUG_PAD_ZERO(0);
SV *dsv1 = PERL_DEBUG_PAD_ZERO(1);
#endif
+ (void)data; /* Currently unused */
RX_MATCH_UTF8_set(prog,do_utf8);
PL_regcc = 0;
}
DEBUG_r({
- char *s0 = UTF ?
- pv_uni_display(dsv0, (U8*)prog->precomp, prog->prelen, 60,
- UNI_DISPLAY_REGEX) :
- prog->precomp;
- int len0 = UTF ? SvCUR(dsv0) : prog->prelen;
- char *s1 = do_utf8 ? sv_uni_display(dsv1, sv, 60,
+ const char * const s0 = UTF
+ ? pv_uni_display(dsv0, (U8*)prog->precomp, prog->prelen, 60,
+ UNI_DISPLAY_REGEX)
+ : prog->precomp;
+ const int len0 = UTF ? SvCUR(dsv0) : prog->prelen;
+ const char * const s1 = do_utf8 ? sv_uni_display(dsv1, sv, 60,
UNI_DISPLAY_REGEX) : startpos;
- int len1 = do_utf8 ? SvCUR(dsv1) : strend - startpos;
+ const int len1 = do_utf8 ? SvCUR(dsv1) : strend - startpos;
if (!PL_colorset)
reginitcolors();
PerlIO_printf(Perl_debug_log,
DEBUG_r( {
SV *prop = sv_newmortal();
- int docolor = *PL_colors[0];
- int taill = (docolor ? 10 : 7); /* 3 chars for "> <" */
+ const int docolor = *PL_colors[0];
+ const int taill = (docolor ? 10 : 7); /* 3 chars for "> <" */
int l = (PL_regeol - locinput) > taill ? taill : (PL_regeol - locinput);
/* The part of the string before starttry has one color
(pref0_len chars), between starttry and current
pref0_len = pref_len;
regprop(prop, scan);
{
- char *s0 =
+ const char * const s0 =
do_utf8 && OP(scan) != CANY ?
pv_uni_display(dsv0, (U8*)(locinput - pref_len),
pref0_len, 60, UNI_DISPLAY_REGEX) :
locinput - pref_len;
- int len0 = do_utf8 ? strlen(s0) : pref0_len;
- char *s1 = do_utf8 && OP(scan) != CANY ?
+ const int len0 = do_utf8 ? strlen(s0) : pref0_len;
+ const char * const s1 = do_utf8 && OP(scan) != CANY ?
pv_uni_display(dsv1, (U8*)(locinput - pref_len + pref0_len),
pref_len - pref0_len, 60, UNI_DISPLAY_REGEX) :
locinput - pref_len + pref0_len;
- int len1 = do_utf8 ? strlen(s1) : pref_len - pref0_len;
- char *s2 = do_utf8 && OP(scan) != CANY ?
+ const int len1 = do_utf8 ? strlen(s1) : pref_len - pref0_len;
+ const char * const s2 = do_utf8 && OP(scan) != CANY ?
pv_uni_display(dsv2, (U8*)locinput,
PL_regeol - locinput, 60, UNI_DISPLAY_REGEX) :
locinput;
- int len2 = do_utf8 ? strlen(s2) : l;
+ const int len2 = do_utf8 ? strlen(s2) : l;
PerlIO_printf(Perl_debug_log,
"%4"IVdf" <%s%.*s%s%s%.*s%s%s%s%.*s%s>%*s|%3"IVdf":%*s%s\n",
(IV)(locinput - PL_bostr),
break;
case SAVEt_FREEPV:
ptr = SSPOPPTR;
- Safefree((char*)ptr);
+ Safefree(ptr);
break;
case SAVEt_CLEARSV:
ptr = (void*)&PL_curpad[SSPOPLONG];
svanext = (SV*) SvANY(svanext);
if (!SvFAKE(sva))
- Safefree((void *)sva);
+ Safefree(sva);
}
for (arena = PL_xiv_arenaroot; arena; arena = arenanext) {
(UV)s[1], startbyte);
else
Perl_sv_catpvf(aTHX_ sv, "(unexpected non-continuation byte 0x%02"UVxf", %d byte%s after start byte 0x%02"UVxf", expected %d bytes)",
- (UV)s[1], s - s0, s - s0 > 1 ? "s" : "", startbyte, expectlen);
+ (UV)s[1], s - s0, s - s0 > 1 ? "s" : "", startbyte, (int)expectlen);
break;
case UTF8_WARN_FE_FF:
break;
case UTF8_WARN_SHORT:
Perl_sv_catpvf(aTHX_ sv, "(%d byte%s, need %d, after start byte 0x%02"UVxf")",
- curlen, curlen == 1 ? "" : "s", expectlen, startbyte);
+ (int)curlen, curlen == 1 ? "" : "s", (int)expectlen, startbyte);
expectlen = curlen; /* distance for caller to skip */
break;
case UTF8_WARN_OVERFLOW:
break;
case UTF8_WARN_LONG:
Perl_sv_catpvf(aTHX_ sv, "(%d byte%s, need %d, after start byte 0x%02"UVxf")",
- expectlen, expectlen == 1 ? "": "s", UNISKIP(uv), startbyte);
+ (int)expectlen, expectlen == 1 ? "": "s", UNISKIP(uv), startbyte);
break;
case UTF8_WARN_FFFF:
Perl_sv_catpvf(aTHX_ sv, "(character 0x%04"UVxf")", uv);