Perl_scalarvoid(pTHX_ OP *o)
{
OP *kid;
- char* useless = 0;
+ const char* useless = 0;
SV* sv;
U8 want;
left->op_type == OP_RV2HV ||
left->op_type == OP_PADAV ||
left->op_type == OP_PADHV)) {
- char *desc = PL_op_desc[(right->op_type == OP_SUBST ||
+ const char *desc = PL_op_desc[(right->op_type == OP_SUBST ||
right->op_type == OP_TRANS)
? right->op_type : OP_MATCH];
const char *sample = ((left->op_type == OP_RV2AV ||
static int
uvcompare(const void *a, const void *b)
{
- if (*((UV *)a) < (*(UV *)b))
+ if (*((const UV *)a) < (*(const UV *)b))
return -1;
- if (*((UV *)a) > (*(UV *)b))
+ if (*((const UV *)a) > (*(const UV *)b))
return 1;
- if (*((UV *)a+1) < (*(UV *)b+1))
+ if (*((const UV *)a+1) < (*(const UV *)b+1))
return -1;
- if (*((UV *)a+1) > (*(UV *)b+1))
+ if (*((const UV *)a+1) > (*(const UV *)b+1))
return 1;
return 0;
}
OP *
Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o)
{
- U32 seq = intro_my();
+ const U32 seq = intro_my();
register COP *cop;
NewOp(1101, cop, 1, COP);
expr = newUNOP(OP_DEFINED, 0,
newASSIGNOP(0, newDEFSVOP(), 0, expr) );
} else if (expr && (expr->op_flags & OPf_KIDS)) {
- OP *k1 = ((UNOP*)expr)->op_first;
- OP *k2 = (k1) ? k1->op_sibling : NULL;
+ const OP *k1 = ((UNOP*)expr)->op_first;
+ const OP *k2 = (k1) ? k1->op_sibling : NULL;
switch (expr->op_type) {
case OP_NULL:
if (k2 && k2->op_type == OP_READLINE
if (name)
Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, name);
if (SvPOK(cv))
- Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", (SV *)cv);
+ Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", (const SV *)cv);
else
Perl_sv_catpv(aTHX_ msg, ": none");
sv_catpv(msg, " vs ");
char *s = strrchr(name, ':');
s = s ? s+1 : name;
if (strEQ(s, "BEGIN")) {
- char *not_safe =
+ const char not_safe[] =
"BEGIN not safe after errors--compilation aborted";
if (PL_in_eval & EVAL_KEEPERR)
Perl_croak(aTHX_ not_safe);
*/
CV *
-Perl_newCONSTSUB(pTHX_ HV *stash, char *name, SV *sv)
+Perl_newCONSTSUB(pTHX_ HV *stash, const char *name, SV *sv)
{
CV* cv;
CvXSUB(cv) = subaddr;
if (name) {
- char *s = strrchr(name,':');
+ const char *s = strrchr(name,':');
if (s)
s++;
else
if (SvROK(kidsv) && SvREADONLY(kidsv)) {
SV *rsv = SvRV(kidsv);
int svtype = SvTYPE(rsv);
- char *badtype = Nullch;
+ const char *badtype = Nullch;
switch (o->op_type) {
case OP_RV2SV:
return o;
}
if ((PL_hints & HINT_STRICT_REFS) && (kid->op_private & OPpCONST_BARE)) {
- char *badthing = Nullch;
+ const char *badthing = Nullch;
switch (o->op_type) {
case OP_RV2SV:
badthing = "a SCALAR";
/* is this op a FH constructor? */
if (is_handle_constructor(o,numargs)) {
- char *name = Nullch;
+ const char *name = Nullch;
STRLEN len = 0;
flags = 0;
name = 0;
if ((op = ((BINOP*)kid)->op_first)) {
SV *tmpstr = Nullsv;
- char *a =
+ const char *a =
kid->op_type == OP_AELEM ?
"[]" : "{}";
if (((op->op_type == OP_RV2AV) ||
if (ckWARN(WARN_SYNTAX)) {
OP *kid = cLISTOPo->op_first->op_sibling;
if (kid && kid->op_type == OP_MATCH) {
- char *pmstr = "STRING";
+ const char *pmstr = "STRING";
if (PM_GETRE(kPMOP))
pmstr = PM_GETRE(kPMOP)->precomp;
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
-char* Perl_custom_op_name(pTHX_ OP* o)
+const char* Perl_custom_op_name(pTHX_ const OP* o)
{
- IV index = PTR2IV(o->op_ppaddr);
+ const IV index = PTR2IV(o->op_ppaddr);
SV* keysv;
HE* he;
return SvPV_nolen(HeVAL(he));
}
-char* Perl_custom_op_desc(pTHX_ OP* o)
+const char* Perl_custom_op_desc(pTHX_ const OP* o)
{
- IV index = PTR2IV(o->op_ppaddr);
+ const IV index = PTR2IV(o->op_ppaddr);
SV* keysv;
HE* he;