]> git.vpit.fr Git - perl/modules/re-engine-Hooks.git/blobdiff - lib/re/engine/Hooks.pm
Rename *comp* (resp. *exec*) to *comp_node* (resp. *exec_node*)
[perl/modules/re-engine-Hooks.git] / lib / re / engine / Hooks.pm
index 50ba58e63d8f294e18204e001403bd0c971e5b5a..97da688e29e21f3c1e1e2a61ef7927eea2a1dad5 100644 (file)
@@ -32,7 +32,7 @@ In your XS file :
 
     #include "re_engine_hooks.h"
 
-    STATIC void dri_comp_hook(pTHX_ regexp *rx, regnode *node) {
+    STATIC void dri_comp_node_hook(pTHX_ regexp *rx, regnode *node) {
      ...
     }
 
@@ -46,8 +46,8 @@ In your XS file :
     BOOT:
     {
      reh_config cfg;
-     cfg.comp = dri_comp_hook;
-     cfg.exec = dri_exec_hook;
+     cfg.comp_node = dri_comp_node_hook;
+     cfg.exec_node = dri_exec_node_hook;
      reh_register("Devel::Regexp::Instrument", &cfg);
     }
 
@@ -96,19 +96,19 @@ This module provides a version of the perl regexp engine that can call user-defi
 
 The C API is made available through the F<re_engine_hooks.h> header file.
 
-=head2 C<reh_comp_hook>
+=head2 C<reh_comp_node_hook>
 
-The typedef for the regexp compilation phase hook.
+The typedef for the regexp node compilation phase hook.
 Currently evaluates to :
 
-    typedef void (*reh_comp_hook)(pTHX_ regexp *, regnode *);
+    typedef void (*reh_comp_node_hook)(pTHX_ regexp *, regnode *);
 
 =head2 C<reh_exec_hook>
 
-The typedef for the regexp execution phase hook.
+The typedef for the regexp node_execution phase hook.
 Currently evaluates to :
 
-    typedef void (*reh_exec_hook)(pTHX_ regexp *, regnode *, regmatch_info *, regmatch_state *);
+    typedef void (*reh_exec_node_hook)(pTHX_ regexp *, regnode *, regmatch_info *, regmatch_state *);
 
 =head2 C<reh_config>
 
@@ -119,16 +119,16 @@ It has the following members :
 
 =item *
 
-C<comp>
+C<comp_node>
 
-A function pointer of type C<reh_comp_hook> that will be called each time a regnode is compiled.
+A function pointer of type C<reh_comp_node_hook> that will be called each time a regnode is compiled.
 Allowed to be C<NULL> if you don't want to call anything for this phase.
 
 =item *
 
-C<exec>
+C<exec_node>
 
-A function pointer of type C<reh_exec_hook> that will be called each time a regnode is executed.
+A function pointer of type C<reh_exec_node_hook> that will be called each time a regnode is executed.
 Allowed to be C<NULL> if you don't want to call anything for this phase.
 
 =back
@@ -139,7 +139,7 @@ Allowed to be C<NULL> if you don't want to call anything for this phase.
 
 Registers the callbacks specified by the C<reh_config *> object C<cfg> under the given name C<key>.
 C<cfg> can be a pointer to a static object of type C<reh_config>.
-C<key> should match with the argument passed to L</enable> and L</disable> in Perl land.
+C<key> is expected to be a nul-terminated string and should match the argument passed to L</enable> and L</disable> in Perl land.
 An exception will be thrown if C<key> has already been used to register callbacks.
 
 =cut
@@ -157,13 +157,13 @@ my $croak = sub {
 
     enable $key;
 
-Lexically enables the hooks associated with the key C<$key>
+Lexically enables the hooks associated with the key C<$key>.
 
 =head2 C<disable>
 
     disable $key;
 
-Lexically disables the hooks associated with the key C<$key>
+Lexically disables the hooks associated with the key C<$key>.
 
 =cut
 
@@ -205,7 +205,7 @@ sub disable {
 
 =head1 EXAMPLES
 
-See the F<t/re-engine-Hooks-TestDist/> directory in the distribution.
+Please refer to the F<t/re-engine-Hooks-TestDist/> directory in the distribution.
 It implements a couple of simple examples.
 
 =head1 DEPENDENCIES