summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-06-21 10:24:44 +0900
committerGitHub <[email protected]>2021-06-21 10:24:44 +0900
commite893f805b10d4690dfd466eb0e6dd79f6fb49010 (patch)
tree85a51512c6e8da2a0aadc7568b91e9ae8dba4c5d /src/string.c
parentf678620a436aa015f9252858aa00112256ab0668 (diff)
parent0c5c04d7c8a64b10290c63c2d83b6055f99815f4 (diff)
downloadmruby-e893f805b10d4690dfd466eb0e6dd79f6fb49010.tar.gz
mruby-e893f805b10d4690dfd466eb0e6dd79f6fb49010.zip
Merge pull request #5486 from dearblue/alloc-castfree
Added `MRB_OBJ_ALLOC()` macro that does not require a cast
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 9af361f18..03d9c8a9c 100644
--- a/src/string.c
+++ b/src/string.c
@@ -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,