From 54132e436494b4797ca53cbd934963e7d752ac42 Mon Sep 17 00:00:00 2001 From: ksss Date: Wed, 5 Mar 2014 15:06:29 +0000 Subject: make embed string when create literals --- src/object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/object.c') diff --git a/src/object.c b/src/object.c index b996e6933..2f14c5698 100644 --- a/src/object.c +++ b/src/object.c @@ -390,7 +390,6 @@ void mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t) { const struct types *type = builtin_types; - struct RString *s; enum mrb_vtype xt; xt = mrb_type(x); @@ -409,8 +408,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t) etype = "Symbol"; } else if (mrb_special_const_p(x)) { - s = mrb_str_ptr(mrb_obj_as_string(mrb, x)); - etype = s->as.heap.ptr; + etype = RSTRING_PTR(mrb_obj_as_string(mrb, x)); } else { etype = mrb_obj_classname(mrb, x); -- cgit v1.2.3