summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regcomp.c1
-rw-r--r--regcomp.h9
2 files changed, 10 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 209743e26a..575bd43124 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4586,6 +4586,7 @@ Perl_pregfree(pTHX_ struct regexp *r)
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]);
diff --git a/regcomp.h b/regcomp.h
index b9542c9bce..b336bec54b 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -350,6 +350,15 @@ typedef struct re_scream_pos_data_s
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;