summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-01-26 14:19:47 +0000
committerDavid Mitchell <davem@iabyn.com>2014-02-07 22:39:37 +0000
commit6480a6c448dec40aad54025b06ea6b8bdbc54527 (patch)
tree57714ab372465d985a65377bf003c9c65bf52919 /regexp.h
parent3043e7b49611b7462047bf3742511470995b98bd (diff)
downloadperl-6480a6c448dec40aad54025b06ea6b8bdbc54527.tar.gz
regex substrs: record index of check substr
Currently prog->substrs->data[] is a 3 element array of structures. Elements 0 and 1 record the longest anchored and floating substrings, while element 2 ('check'), is a copy of the longest of 0 and 1. Record in a new field, prog->substrs->check_ix, the index of which element was copied. (Eventually I intend to remove the copy altogether.) Also for the anchored substr, set max_offset equal to min offset. Previously it was left as zero and ignored, although if copied to check, the check copy of max *was* set equal to min. Having this always set will allow us to make the code simpler.
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/regexp.h b/regexp.h
index eba59745ab..d32e669a4c 100644
--- a/regexp.h
+++ b/regexp.h
@@ -43,6 +43,7 @@ struct reg_substr_datum {
SSize_t end_shift; /* how many fixed chars must end the string */
};
struct reg_substr_data {
+ U8 check_ix; /* index into data[] of check substr */
struct reg_substr_datum data[3]; /* Actual array */
};