Commit 49d945bb authored by Masaki Muranaka's avatar Masaki Muranaka

Use memcmp instead of strcmp if it is possible.

parent bd7cf9ba
......@@ -632,7 +632,7 @@ noregexp(mrb_state *mrb, mrb_value self)
static void
regexp_check(mrb_state *mrb, mrb_value obj)
{
if (!strcmp(mrb_obj_classname(mrb, obj), REGEXP_CLASS)) {
if (!memcmp(mrb_obj_classname(mrb, obj), REGEXP_CLASS, sizeof(REGEXP_CLASS) - 1)) {
noregexp(mrb, obj);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment