mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
string.c: use presym to define String class
This commit is contained in:
+1
-1
@@ -3057,7 +3057,7 @@ mrb_init_string(mrb_state *mrb)
|
||||
mrb_static_assert(RSTRING_EMBED_LEN_MAX < (1 << MRB_STR_EMBED_LEN_BIT),
|
||||
"pointer size too big for embedded string");
|
||||
|
||||
mrb->string_class = s = mrb_define_class(mrb, "String", mrb->object_class); /* 15.2.10 */
|
||||
mrb->string_class = s = mrb_define_class_id(mrb, MRB_SYM(String), mrb->object_class); /* 15.2.10 */
|
||||
MRB_SET_INSTANCE_TT(s, MRB_TT_STRING);
|
||||
|
||||
mrb_define_method_id(mrb, s, MRB_SYM(bytesize), mrb_str_bytesize, MRB_ARGS_NONE());
|
||||
|
||||
Reference in New Issue
Block a user