This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Add #ifdefs for RE_TRACK_PATTERN_OFFSETS
authorKarl Williamson <khw@cpan.org>
Sat, 15 Sep 2018 14:17:21 +0000 (08:17 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 17 Oct 2018 15:23:04 +0000 (09:23 -0600)
This is supposed to be independent of DEBUGGING, but in fact regcomp.c
would not compile unless both were false or both true

regcomp.c

index 3c09bc7..f2f5703 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -3467,7 +3467,9 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
                    ) {
                    regnode *fix = convert;
                    U32 word = trie->wordcount;
+#ifdef RE_TRACK_PATTERN_OFFSETS
                    mjd_nodelen++;
+#endif
                    Set_Node_Offset_Length(convert, mjd_offset, state - 1);
                    while( ++fix < n ) {
                        Set_Node_Offset_Length(fix, 0, 0);
@@ -3541,7 +3543,9 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
                 optimisation.
              */
             while( optimize < jumper ) {
+#ifdef RE_TRACK_PATTERN_OFFSETS
                 mjd_nodelen += Node_Length((optimize));
+#endif
                 OP( optimize ) = OPTIMIZED;
                 Set_Node_Offset_Length(optimize,0,0);
                 optimize++;