summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc2
-rw-r--r--op.c4
-rw-r--r--proto.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/embed.fnc b/embed.fnc
index 45039830b8..719cf5c64f 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1147,7 +1147,7 @@ s |void |no_bareword_allowed|NN const OP *o
sR |OP* |no_fh_allowed|NN OP *o
sR |OP* |too_few_arguments|NN OP *o|NN const char* name
sR |OP* |too_many_arguments|NN OP *o|NN const char* name
-s |bool |looks_like_bool|NN OP* o
+s |bool |looks_like_bool|NN const OP* o
s |OP* |newGIVWHENOP |NULLOK OP* cond|NN OP *block \
|I32 enter_opcode|I32 leave_opcode \
|PADOFFSET entertarg
diff --git a/op.c b/op.c
index 9a5dfb1e9a..71d0764c22 100644
--- a/op.c
+++ b/op.c
@@ -4607,7 +4607,7 @@ S_newGIVWHENOP(pTHX_ OP *cond, OP *block,
*/
STATIC
bool
-S_looks_like_bool(pTHX_ OP *o)
+S_looks_like_bool(pTHX_ const OP *o)
{
dVAR;
switch(o->op_type) {
@@ -4678,7 +4678,7 @@ Perl_newGIVENOP(pTHX_ OP *cond, OP *block, PADOFFSET defsv_off)
OP *
Perl_newWHENOP(pTHX_ OP *cond, OP *block)
{
- bool cond_llb = (!cond || looks_like_bool(cond));
+ const bool cond_llb = (!cond || looks_like_bool(cond));
OP *cond_op;
if (cond_llb)
diff --git a/proto.h b/proto.h
index c6c0d2ff78..fd42b8cbde 100644
--- a/proto.h
+++ b/proto.h
@@ -3180,7 +3180,7 @@ STATIC OP* S_too_many_arguments(pTHX_ OP *o, const char* name)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
-STATIC bool S_looks_like_bool(pTHX_ OP* o)
+STATIC bool S_looks_like_bool(pTHX_ const OP* o)
__attribute__nonnull__(pTHX_1);
STATIC OP* S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode, PADOFFSET entertarg)