diff options
author | kosako <kosako@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-03-23 12:08:08 +0000 |
---|---|---|
committer | kosako <kosako@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-03-23 12:08:08 +0000 |
commit | f69c1f18ee4d5ddd0aa5e865360f8b14c34e37de (patch) | |
tree | a228f2ce7132e82b99381a69afcd3f05b9737488 /regcomp.c | |
parent | 0fa1086760eb0a5964789eb619769764107458ca (diff) |
merge Oniguruma 4.0.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4875,6 +4875,11 @@ onig_alloc_init(regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag, if (ONIGENC_IS_UNDEF(enc)) return ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED; + if ((option & (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) + == (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) { + return ONIGERR_INVALID_COMBINATION_OF_OPTIONS; + } + *reg = (regex_t* )xmalloc(sizeof(regex_t)); if (IS_NULL(*reg)) return ONIGERR_MEMORY; (*reg)->state = ONIG_STATE_MODIFY; |