From a1c1fc558a0ee791e91a66cae5c9515679890339 Mon Sep 17 00:00:00 2001 From: TSUYUSATO Kitsune Date: Tue, 8 Nov 2022 15:13:27 +0900 Subject: Revert "Refactor field names" This reverts commit 1e6673d6bbd2adbf555d82c7c0906ceb148ed6ee. --- regint.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'regint.h') diff --git a/regint.h b/regint.h index e1e48c0951..12b5d5c70a 100644 --- a/regint.h +++ b/regint.h @@ -45,8 +45,8 @@ #define USE_CACHE_MATCH_OPT #ifdef USE_CACHE_MATCH_OPT -# define NUM_CACHE_INDEX_FAIL -1 -# define NUM_CACHE_INDEX_UNINIT -2 +# define NUM_CACHE_OPCODE_FAIL -1 +# define NUM_CACHE_OPCODE_UNINIT -2 #endif #if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \ @@ -874,11 +874,10 @@ typedef struct _OnigStackType { #ifdef USE_CACHE_MATCH_OPT typedef struct { - UChar* addr; /* pointer to corresponding opcode. */ - int point; /* cache point number (in outer repeat if `outer_repeat != -1`) */ - int outer_repeat; /* outer repeat index number */ + UChar *addr; + int num; + int outer_repeat; } OnigCacheIndex; -#define NO_OUTER_REPEAT -1 #endif typedef struct { @@ -904,12 +903,12 @@ typedef struct { uint64_t end_time; #endif #ifdef USE_CACHE_MATCH_OPT - int num_fail; /* counter of failure (backtrack) number for switching cache optimization. */ - int num_cache_point; /* number of cache point in program */ - int num_cache_index; /* size of cache index array */ - int enable_cache_opt; /* whether cache optimization is enabled */ - OnigCacheIndex* cache_index; /* cache index array for computing cache point number */ - uint8_t* cache; /* bit array for cache optimization */ + 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; -- cgit v1.2.1