]> git.vpit.fr Git - perl/modules/re-engine-Hooks.git/blobdiff - Hooks.xs
Fix broken linkage on Windows
[perl/modules/re-engine-Hooks.git] / Hooks.xs
index b312223c08fff684b75445b2a1940a2731d85af7..6fb127e2045aa33a55e446ff01d3a0e30b950d08 100644 (file)
--- a/Hooks.xs
+++ b/Hooks.xs
@@ -143,8 +143,9 @@ EXTERN_C SV *    reh_reg_qr_package(pTHX_ REGEXP * const);
 EXTERN_C void *  reh_regdupe(pTHX_ REGEXP * const, CLONE_PARAMS *);
 EXTERN_C void *  reh_re_dupe(pTHX_ REGEXP * const, CLONE_PARAMS *);
 #endif
-
-EXTERN_C const struct regexp_engine reh_regexp_engine;
+#if REH_HAS_PERL(5, 17, 1)
+EXTERN_C REGEXP *reh_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *VOL old_re, bool *is_bare_re, U32 orig_rx_flags, U32 pm_flags);
+#endif
 
 const struct regexp_engine reh_regexp_engine = {
  reh_regcomp,
@@ -157,13 +158,16 @@ const struct regexp_engine reh_regexp_engine = {
  reh_reg_numbered_buff_length,
  reh_reg_named_buff,
  reh_reg_named_buff_iter,
- reh_reg_qr_package,
+ reh_reg_qr_package
 #if defined(USE_ITHREADS)
- reh_re_dupe
+ , reh_re_dupe
+#endif
+#if REH_HAS_PERL(5, 17, 1)
+ , reh_op_compile
 #endif
 };
 
-/* --- Private API --------------------------------------------------------- */
+/* --- Internal regexp structure -> hook list inside-out mapping ----------- */
 
 typedef struct {
  size_t            count;
@@ -220,7 +224,7 @@ STATIC perl_mutex reh_private_map_mutex;
  REH_UNLOCK(&reh_private_map_mutex);                 \
 } STMT_END
 
-STATIC reh_private *reh_private_map_store(pTHX_ void *ri, reh_private *priv) {
+STATIC void reh_private_map_store(pTHX_ void *ri, reh_private *priv) {
 #define reh_private_map_store(R, P) reh_private_map_store(aTHX_ (R), (P))
  REH_LOCK(&reh_private_map_mutex);
  ptable_private_store(reh_private_map, ri, priv);
@@ -251,6 +255,8 @@ STATIC void reh_private_map_delete(pTHX_ void *ri) {
  return;
 }
 
+/* --- Private API --------------------------------------------------------- */
+
 void reh_call_comp_begin_hook(pTHX_ regexp *rx) {
  SV *hint = reh_hint();
 
@@ -298,12 +304,12 @@ void reh_call_comp_begin_hook(pTHX_ regexp *rx) {
  }
 }
 
-void reh_call_comp_hook(pTHX_ regexp *rx, regnode *node) {
- REH_PRIVATE_MAP_FOREACH(cbs->comp(aTHX_ rx, node));
+void reh_call_comp_node_hook(pTHX_ regexp *rx, regnode *node) {
+ REH_PRIVATE_MAP_FOREACH(cbs->comp_node(aTHX_ rx, node));
 }
 
-void reh_call_exec_hook(pTHX_ regexp *rx, regnode *node, regmatch_info *reginfo, regmatch_state *st) {
- REH_PRIVATE_MAP_FOREACH(cbs->exec(aTHX_ rx, node, reginfo, st));
+void reh_call_exec_node_hook(pTHX_ regexp *rx, regnode *node, regmatch_info *reginfo, regmatch_state *st) {
+ REH_PRIVATE_MAP_FOREACH(cbs->exec_node(aTHX_ rx, node, reginfo, st));
 }
 
 void reh_re_free(pTHX_ REGEXP * const RX) {