mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-string-ext (str_ascii_only_p): simplify the flag update
This commit is contained in:
@@ -1321,7 +1321,7 @@ str_ascii_only_p(mrb_state *mrb, mrb_value str)
|
||||
if (*p & 0x80) return mrb_false_value();
|
||||
p++;
|
||||
}
|
||||
RSTR_SET_SINGLE_BYTE_FLAG(mrb_str_ptr(str));
|
||||
mrb_str_ptr(str)->flags |= MRB_STR_SINGLE_BYTE;
|
||||
return mrb_true_value();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user