mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Added MRB_OBJ_ALLOC() macro that does not require a cast
The `MRB_OBJ_ALLOC()` macro function returns a pointer of the type corresponding to the constant literal defined in `enum mrb_vtype`.
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ typedef struct mrb_shared_string {
|
||||
|
||||
const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
#define mrb_obj_alloc_string(mrb) ((struct RString*)mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
|
||||
#define mrb_obj_alloc_string(mrb) MRB_OBJ_ALLOC((mrb), MRB_TT_STRING, (mrb)->string_class)
|
||||
|
||||
static struct RString*
|
||||
str_init_normal_capa(mrb_state *mrb, struct RString *s,
|
||||
|
||||
Reference in New Issue
Block a user