mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Use memcmp instead of strcmp if it is possible.
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user