summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-27 16:04:30 +0000
committerksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-27 16:04:30 +0000
commitaa1fe3248fca7cf758c8ea034a0fdaab1e20d145 (patch)
tree4d286c8e9cfe421792eea657e5c78e385e537420 /regcomp.c
parent653fbad62809d98e01a9bf70e7c6f69fbbc5b524 (diff)
This commit was generated by cvs2svn to compensate for changes in r6227,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/regcomp.c b/regcomp.c
index de44cfe..69a6301 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3950,17 +3950,22 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
}
}
- if (! ONIGENC_IS_SINGLEBYTE(env->enc)) {
- if (! IS_NULL(cc->mbuf) ||
- (cc->not != 0 && found != 0)) {
- for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
- z = ONIGENC_IS_MBC_HEAD(env->enc, i);
- if (z) {
- mb_found = 1;
- add_char_opt_map_info(&opt->map, i);
- }
- }
- }
+ if (IS_NULL(cc->mbuf)) {
+ if (cc->not) {
+ for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
+ add_char_opt_map_info(&opt->map, i);
+ }
+ mb_found = 1;
+ }
+ }
+ else {
+ for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
+ z = ONIGENC_IS_MBC_HEAD(env->enc, i);
+ if (z) {
+ mb_found = 1;
+ add_char_opt_map_info(&opt->map, i);
+ }
+ }
}
if (mb_found) {