diff options
author | TSUYUSATO Kitsune <make.just.on@gmail.com> | 2023-05-04 13:15:51 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 13:15:51 +0900 |
commit | ac730d3e759207fd0ea7289815985ee867689b9c (patch) | |
tree | 45fb75cd4388d92c0847a54f5bd66fc133483e50 /regint.h | |
parent | 18b27185c37378c65fee12091c5ff90d5be2ec97 (diff) |
Delay start of the match cache optimization (#7738)
Notes
Notes:
Merged-By: makenowjust <make.just.on@gmail.com>
Diffstat (limited to 'regint.h')
-rw-r--r-- | regint.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -909,7 +909,7 @@ typedef struct { uint64_t end_time; #endif #ifdef USE_MATCH_CACHE - int enable_match_cache; + int match_cache_status; long num_fails; long num_cache_opcodes; OnigCacheOpcode* cache_opcodes; @@ -918,8 +918,13 @@ typedef struct { #endif } OnigMatchArg; +#define NUM_CACHE_OPCODES_UNINIT 1 #define NUM_CACHE_OPCODES_IMPOSSIBLE -1 -#define NUM_CACHE_OPCODES_UNINIT -2 + +#define MATCH_CACHE_STATUS_UNINIT 1 +#define MATCH_CACHE_STATUS_INIT 2 +#define MATCH_CACHE_STATUS_DISABLED -1 +#define MATCH_CACHE_STATUS_ENABLED 0 #define IS_CODE_SB_WORD(enc,code) \ (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code)) |