develooper Front page | perl.perl5.porters | Postings from July 2001

Patch: document reg_data.what member

From:
Mark-Jason Dominus
Date:
July 12, 2001 11:25
Subject:
Patch: document reg_data.what member
Message ID:
20010712182532.14821.qmail@plover.com

--- regcomp.h	2001/07/12 18:17:23	1.1
+++ regcomp.h	2001/07/12 18:23:22
@@ -350,6 +350,15 @@
     I32 *scream_pos;		/* Internal iterator of scream. */
 } re_scream_pos_data;
 
+/* .what is a character array with one character for each member of .data
+ * The character describes the function of the corresponding .data item:
+ *   f - start-class data for regstclass optimization  
+ *   n - Root of op tree for (?{EVAL}) item
+ *   o - Start op for (?{EVAL}) item
+ *   p - Pad for (?{EVAL} item
+ *   s - swash for unicode-style character class
+ * 20010712 mjd@plover.com
+ */
 struct reg_data {
     U32 count;
     U8 *what;
--- regcomp.c	2001/07/12 18:22:17	1.1
+++ regcomp.c	2001/07/12 18:22:38
@@ -4586,6 +4586,7 @@
 	SV** old_curpad;
 
 	while (--n >= 0) {
+          /* If you add a ->what type here, update the comment in regcomp.h */
 	    switch (r->data->what[n]) {
 	    case 's':
 		SvREFCNT_dec((SV*)r->data->data[n]);



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About