diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-12 12:48:45 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-12 18:35:32 +0900 |
commit | 1b697d7cb5eac5b7a05f659fbbde56a73d81d704 (patch) | |
tree | 46f06b805ef7c1fc43daedaa93f8f9cce478fff4 /regexec.c | |
parent | 2e1a95b5699ed1151f90659e40eeb44c4330a882 (diff) |
Constify
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7694
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1227,12 +1227,12 @@ bsearch_cache_index(const OnigCacheIndex *table, long num_cache_table, const UCh } static long -find_cache_index_table(regex_t* reg, OnigStackType *stk, OnigStackIndex *repeat_stk, OnigCacheIndex* table, long num_cache_table, UChar* p) +find_cache_index_table(regex_t* reg, const OnigStackType *stk, const OnigStackIndex *repeat_stk, const OnigCacheIndex* table, long num_cache_table, const UChar* p) { long m; - OnigCacheIndex* item; - OnigRepeatRange* range; - OnigStackType *stkp; + const OnigCacheIndex* item; + const OnigRepeatRange* range; + const OnigStackType *stkp; int count = 0; int is_inc = *p == OP_REPEAT_INC || *p == OP_REPEAT_INC_NG; @@ -1264,11 +1264,11 @@ find_cache_index_table(regex_t* reg, OnigStackType *stk, OnigStackIndex *repeat_ } static void -reset_match_cache(regex_t* reg, UChar* pbegin, UChar* pend, long pos, uint8_t* match_cache, OnigCacheIndex *table, long num_cache_size, long num_cache_table) +reset_match_cache(regex_t* reg, const UChar* pbegin, const UChar* pend, long pos, uint8_t* match_cache, const OnigCacheIndex *table, long num_cache_size, long num_cache_table) { long m1 = 0, m2 = 0; int is_inc = *pend == OP_REPEAT_INC || *pend == OP_REPEAT_INC_NG; - OnigCacheIndex *item1, *item2; + const OnigCacheIndex *item1, *item2; long k1, k2, base; m1 = bsearch_cache_index(table, num_cache_table, pbegin); |