summaryrefslogtreecommitdiff
path: root/include/ruby/onigmo.h
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2019-04-20 00:44:51 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-07 21:58:55 +0900
commita47f598d77ac97f9fe89fe16aa8bcab4fd262c16 (patch)
tree069ca07cf1e65cc9d253dab5101d23bed933c21a /include/ruby/onigmo.h
parent7d805e67f3275aef066d77aa9c32bef715c362ed (diff)
Reduce ONIG_NREGION from 10 to 4: power of 2 and testing revealed most pattern matches are less than or equal to 4 results
Closes: https://github.com/ruby/ruby/pull/2135
Diffstat (limited to 'include/ruby/onigmo.h')
-rw-r--r--include/ruby/onigmo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/onigmo.h b/include/ruby/onigmo.h
index 34b8268d59..6187b37dc3 100644
--- a/include/ruby/onigmo.h
+++ b/include/ruby/onigmo.h
@@ -434,7 +434,7 @@ int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p);
/* PART: regular expression */
/* config parameters */
-#define ONIG_NREGION 10
+#define ONIG_NREGION 4
#define ONIG_MAX_CAPTURE_GROUP_NUM 32767
#define ONIG_MAX_BACKREF_NUM 1000
#define ONIG_MAX_REPEAT_NUM 100000