mruby-string-ext (str_ascii_only_p): simplify the flag update

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-01-03 08:47:38 +09:00
parent 5a7c944a52
commit 04ab2be2f0
+1 -1
View File
@@ -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();
}