1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
Lourens Naudé 2019-04-20 00:44:51 +01:00 committed by Nobuyoshi Nakada
parent 7d805e67f3
commit a47f598d77
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
5 changed files with 20 additions and 1 deletions

View file

@ -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