mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
hash.c, symbol.c, string.c, mruby-string-ext: undef lesser macro
Add #undef lesser after last usage to prevent macro redefinition warnings when files are amalgamated into a single translation unit. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1226,6 +1226,7 @@ str_casecmp(mrb_state *mrb, mrb_value self)
|
||||
if (len1 > len2) return mrb_fixnum_value(1);
|
||||
return mrb_fixnum_value(-1);
|
||||
}
|
||||
#undef lesser
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
|
||||
@@ -2281,3 +2281,4 @@ mrb_init_hash(mrb_state *mrb)
|
||||
mrb_define_method_id(mrb, h, MRB_SYM(__merge), mrb_hash_merge_m, MRB_ARGS_REQ(1));
|
||||
mrb_define_method_id(mrb, h, MRB_SYM(__compact), mrb_hash_compact, MRB_ARGS_NONE()); /* implementation of Hash#compact! */
|
||||
}
|
||||
#undef lesser
|
||||
|
||||
@@ -1257,6 +1257,7 @@ mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2)
|
||||
if (retval > 0) return 1;
|
||||
return -1;
|
||||
}
|
||||
#undef lesser
|
||||
|
||||
/* 15.2.10.5.3 */
|
||||
|
||||
|
||||
@@ -977,6 +977,7 @@ sym_cmp(mrb_state *mrb, mrb_value s1)
|
||||
return mrb_fixnum_value(-1);
|
||||
}
|
||||
}
|
||||
#undef lesser
|
||||
|
||||
void
|
||||
mrb_init_symbol(mrb_state *mrb)
|
||||
|
||||
Reference in New Issue
Block a user