From c93d5d8be00caac56508448f35362b1b3fa58f02 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 27 Feb 2011 17:45:46 -0700 Subject: [PATCH] regcomp.c: Move code to common place THis is part of the refactoring of the code that sets the alternate array for multi-char folds. Changing the node type to ANYOFV can be done at the last second, in pass 2, as it doesn't change any sizing, etc. --- regcomp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regcomp.c b/regcomp.c index a5fd3e5..4e9a098 100644 --- a/regcomp.c +++ b/regcomp.c @@ -10037,9 +10037,6 @@ parseit: } add_alternate(&unicode_alternate, foldbuf, foldlen); - - /* This node is variable length */ - OP(ret) = ANYOFV; end_multi_fold: ; } } @@ -10269,6 +10266,9 @@ parseit: av_store(av, 0, listsv); av_store(av, 1, NULL); av_store(av, 2, MUTABLE_SV(unicode_alternate)); + if (unicode_alternate) { /* This node is variable length */ + OP(ret) = ANYOFV; + } rv = newRV_noinc(MUTABLE_SV(av)); n = add_data(pRExC_state, 1, "s"); RExC_rxi->data->data[n] = (void*)rv; -- 2.7.4