summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-25 22:19:56 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-25 22:20:23 -0700
commit99a1d0d13934e829126ea4d0e61887470d8138e5 (patch)
tree860433db61ceb1f4e10a07ffc87178337e8df495
parent06b58b76f31d491371d0ab0c38cec33c1c7ba4ab (diff)
downloadperl-99a1d0d13934e829126ea4d0e61887470d8138e5.tar.gz
op.c: op_clear is tempting fate
This if() statement can be reached by op types to which the OpTRANS* flags to not apply. They happen at present not to use any flags that conflict with these (except when OPf_KIDS is set, in which case this code is not reached). But we should make sure, via an assertion, that new flags added to goto or last do not conflict with trans utf8 flags, and that trans utf8 flags (1 and 2), if renumbered, do not con- flict with goto/last utf8 flags (128).
-rw-r--r--op.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/op.c b/op.c
index b4332271ef..c6132909ca 100644
--- a/op.c
+++ b/op.c
@@ -819,6 +819,7 @@ Perl_op_clear(pTHX_ OP *o)
case OP_TRANS:
case OP_TRANSR:
if (o->op_private & (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF)) {
+ assert(o->op_type == OP_TRANS || o->op_type == OP_TRANSR);
#ifdef USE_ITHREADS
if (cPADOPo->op_padix > 0) {
pad_swipe(cPADOPo->op_padix, TRUE);