From: K.Kosako Date: Mon, 5 Aug 2019 00:38:03 +0000 (+0900) Subject: refactoring X-Git-Tag: v6.9.3~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bce3ebba32dba13e778345b76a7d4885ea44562;p=onig refactoring --- diff --git a/harnesses/encode-harness.c b/harnesses/encode-harness.c index b490181..011e0d2 100644 --- a/harnesses/encode-harness.c +++ b/harnesses/encode-harness.c @@ -8,7 +8,8 @@ #include #include -#define DEFAULT_LIMIT 120 +#define PARSE_DEPTH_LIMIT 120 +#define RETRY_LIMIT 120 typedef unsigned char uint8_t; static int @@ -61,8 +62,8 @@ exec(OnigEncoding enc, OnigOptionType options, UChar* pattern_end = (UChar* )apattern_end; onig_initialize(&enc, 1); - onig_set_retry_limit_in_match(DEFAULT_LIMIT); - onig_set_parse_depth_limit(DEFAULT_LIMIT); + onig_set_retry_limit_in_match(RETRY_LIMIT); + onig_set_parse_depth_limit(PARSE_DEPTH_LIMIT); r = onig_new(®, pattern, pattern_end, options, enc, ONIG_SYNTAX_DEFAULT, &einfo);