summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-10-27 14:06:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-10-27 14:06:44 +0000
commit1ae6be1c7649fa55b3105031a58ffe146fa4f2fd (patch)
tree2bdf0dec28a91f5b0e5b8445ed6c203c64e7268a /op.c
parent10a675193b1a7d3751e2d04a91c294c6be9dfaf7 (diff)
parent2b260de0f3727bc62519897f69d6f752c97d8502 (diff)
downloadperl-1ae6be1c7649fa55b3105031a58ffe146fa4f2fd.tar.gz
Integrate with Sarathy; manual resolve on regcomp.c conflicts
(Ilya's changes won). p4raw-id: //depot/cfgperl@4468
Diffstat (limited to 'op.c')
-rw-r--r--op.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/op.c b/op.c
index 8609ba6768..b8006a1670 100644
--- a/op.c
+++ b/op.c
@@ -1816,9 +1816,9 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
char *desc = PL_op_desc[(right->op_type == OP_SUBST ||
right->op_type == OP_TRANS)
? right->op_type : OP_MATCH];
- char *sample = ((left->op_type == OP_RV2AV ||
- left->op_type == OP_PADAV)
- ? "@array" : "%hash");
+ const char *sample = ((left->op_type == OP_RV2AV ||
+ left->op_type == OP_PADAV)
+ ? "@array" : "%hash");
Perl_warner(aTHX_ WARN_UNSAFE,
"Applying %s to %s will act on scalar(%s)",
desc, sample, sample);
@@ -2118,8 +2118,12 @@ Perl_fold_constants(pTHX_ register OP *o)
return o;
if (!(PL_hints & HINT_INTEGER)) {
- if (type == OP_DIVIDE || !(o->op_flags & OPf_KIDS))
+ if (type == OP_MODULO
+ || type == OP_DIVIDE
+ || !(o->op_flags & OPf_KIDS))
+ {
return o;
+ }
for (curop = ((UNOP*)o)->op_first; curop; curop = curop->op_sibling) {
if (curop->op_type == OP_CONST) {