aboutsummaryrefslogtreecommitdiffstats
path: root/regint.h
diff options
context:
space:
mode:
authorTSUYUSATO Kitsune <make.just.on@gmail.com>2022-10-20 16:52:23 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-11-09 23:21:26 +0900
commitf25bb291b42a45d23cfc8658720c62e1f3a7390f (patch)
tree2760425ac665c207dba7805424bd0d5073625b13 /regint.h
parentea3d9893bf4d6c9b6016d5f7fe5a6cf820376e53 (diff)
downloadruby-f25bb291b42a45d23cfc8658720c62e1f3a7390f.tar.gz
Support OP_REPEAT and OP_REPEAT_INC
Diffstat (limited to 'regint.h')
-rw-r--r--regint.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/regint.h b/regint.h
index 9642389936..12b5d5c70a 100644
--- a/regint.h
+++ b/regint.h
@@ -872,6 +872,14 @@ typedef struct _OnigStackType {
} u;
} OnigStackType;
+#ifdef USE_CACHE_MATCH_OPT
+typedef struct {
+ UChar *addr;
+ int num;
+ int outer_repeat;
+} OnigCacheIndex;
+#endif
+
typedef struct {
void* stack_p;
size_t stack_n;
@@ -895,11 +903,12 @@ typedef struct {
uint64_t end_time;
#endif
#ifdef USE_CACHE_MATCH_OPT
- int num_fail;
- int enable_cache_match_opt;
- int num_cache_opcode;
- UChar** cache_index_table; /* array of pointer to p (regex program) */
- uint8_t *match_cache;
+ int num_fail;
+ int enable_cache_match_opt;
+ int num_cache_opcode;
+ int num_cache_table;
+ OnigCacheIndex *cache_index_table;
+ uint8_t *match_cache;
#endif
} OnigMatchArg;