Re: [PATCH] Update CPANPLUS to 0.79_03
[p5sagit/p5-mst-13.2.git] / regexp.h
index d18c2d3..1f72112 100644 (file)
--- a/regexp.h
+++ b/regexp.h
@@ -55,8 +55,17 @@ typedef struct regexp_paren_pair {
     I32 end;
 } regexp_paren_pair;
 
-/* this is ordered such that the most commonly used 
-   fields are at the start of the struct */
+/*
+  The regexp/REGEXP struct, see L<perlreapi> for further documentation
+  on the individual fields. The struct is ordered so that the most
+  commonly used fields are placed at the start.
+
+  Any patch that adds items to this struct will need to include
+  changes to F<sv.c> (C<Perl_re_dup()>) and F<regcomp.c>
+  (C<pregfree()>). This involves freeing or cloning items in the
+  regexp's data array based on the data item's type.
+*/
+
 typedef struct regexp {
         /* what engine created this regexp? */
        const struct regexp_engine* engine; 
@@ -121,14 +130,18 @@ typedef struct regexp_engine {
                        re_scream_pos_data *data);
     SV*     (*checkstr) (pTHX_ REGEXP * const rx);
     void    (*free) (pTHX_ REGEXP * const rx);
-    void    (*numbered_buff_get) (pTHX_ REGEXP * const rx,
-                const I32 paren, SV * const usesv);
-    SV*     (*named_buff_get)(pTHX_ REGEXP * const rx, SV * const namesv,
-                const U32 flags);
+    void    (*numbered_buff_FETCH) (pTHX_ REGEXP * const rx, const I32 paren,
+                             SV * const sv);
+    void    (*numbered_buff_STORE) (pTHX_ REGEXP * const rx, const I32 paren,
+                                   SV const * const value);
+    I32     (*numbered_buff_LENGTH) (pTHX_ REGEXP * const rx, const SV * const sv,
+                                    const I32 paren);
+    SV*     (*named_buff_FETCH) (pTHX_ REGEXP * const rx, SV * const key,
+                                 const U32 flags);
     SV*     (*qr_package)(pTHX_ REGEXP * const rx);
 #ifdef USE_ITHREADS
     void*   (*dupe) (pTHX_ REGEXP * const rx, CLONE_PARAMS *param);
-#endif    
+#endif
 } regexp_engine;
 
 /* Flags stored in regexp->extflags