This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27a1613
)
Perl_newATTRSUB_x: cast a bool arg
author
David Mitchell
<davem@iabyn.com>
Wed, 25 Nov 2015 15:58:20 +0000
(15:58 +0000)
committer
David Mitchell
<davem@iabyn.com>
Wed, 25 Nov 2015 15:58:20 +0000
(15:58 +0000)
S_op_const_sv() expects a bool arg, so cast accordingly.
(Otherwise if the flag bit is > bit 7, it could get truncated to 0)
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
f1d4027
..
168aef3
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-8398,7
+8398,8
@@
Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
block->op_next = 0;
if (ps && !*ps && !attrs && !CvLVALUE(PL_compcv))
const_sv =
- S_op_const_sv(aTHX_ start, PL_compcv, CvCLONE(PL_compcv));
+ S_op_const_sv(aTHX_ start, PL_compcv,
+ cBOOL(CvCLONE(PL_compcv)));
else
const_sv = NULL;
}