]> git.vpit.fr Git - perl/modules/re-engine-Hooks.git/blobdiff - src/5011001/regcomp.c
Fix infinite recursion with perl 5.17.[12]
[perl/modules/re-engine-Hooks.git] / src / 5011001 / regcomp.c
index 10c64d315c8955f526c9250b60d84fbff0b21578..0e3f8a0449cbbfd4814d8414b983c7b15e38ebb5 100644 (file)
@@ -2149,6 +2149,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs
             Set_Node_Offset_Length(convert,mjd_offset,mjd_nodelen);
         });
     } /* end node insert */
+    REH_CALL_COMP_NODE_HOOK(pRExC_state->rx, convert);
     RExC_rxi->data->data[ data_slot + 1 ] = (void*)widecharmap;
 #ifdef DEBUGGING
     RExC_rxi->data->data[ data_slot + TRIE_WORDS_OFFSET ] = (void*)trie_words;
@@ -4172,7 +4173,7 @@ Perl_reginitcolors(pTHX)
 
 
 #ifndef PERL_IN_XSUB_RE
-#define RE_ENGINE_PTR &PL_core_reg_engine
+#define RE_ENGINE_PTR &reh_regexp_engine
 #else
 extern const struct regexp_engine my_reg_engine;
 #define RE_ENGINE_PTR &my_reg_engine
@@ -4410,6 +4411,7 @@ redo_first_pass:
     RExC_rx_sv = rx;
     RExC_rx = r;
     RExC_rxi = ri;
+    REH_CALL_COMP_BEGIN_HOOK(pRExC_state->rx);
 
     /* Second pass: emit code. */
     RExC_flags = pm_flags;     /* don't let top level (?i) bleed */
@@ -8589,7 +8591,7 @@ S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op)
     NODE_ALIGN_FILL(ret);
     ptr = ret;
     FILL_ADVANCE_NODE(ptr, op);
-    REH_CALL_REGCOMP_HOOK(pRExC_state->rx, (ptr) - 1);
+    REH_CALL_COMP_NODE_HOOK(pRExC_state->rx, (ptr) - 1);
 #ifdef RE_TRACK_PATTERN_OFFSETS
     if (RExC_offsets) {         /* MJD */
        MJD_OFFSET_DEBUG(("%s:%d: (op %s) %s %"UVuf" (len %"UVuf") (max %"UVuf").\n", 
@@ -8645,7 +8647,7 @@ S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg)
     NODE_ALIGN_FILL(ret);
     ptr = ret;
     FILL_ADVANCE_NODE_ARG(ptr, op, arg);
-    REH_CALL_REGCOMP_HOOK(pRExC_state->rx, (ptr) - 2);
+    REH_CALL_COMP_NODE_HOOK(pRExC_state->rx, (ptr) - 2);
 #ifdef RE_TRACK_PATTERN_OFFSETS
     if (RExC_offsets) {         /* MJD */
        MJD_OFFSET_DEBUG(("%s(%d): (op %s) %s %"UVuf" <- %"UVuf" (max %"UVuf").\n", 
@@ -8762,7 +8764,7 @@ S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth)
 #endif    
     src = NEXTOPER(place);
     FILL_ADVANCE_NODE(place, op);
-    REH_CALL_REGCOMP_HOOK(pRExC_state->rx, (place) - 1);
+    REH_CALL_COMP_NODE_HOOK(pRExC_state->rx, (place) - 1);
     Zero(src, offset, regnode);
 }