mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-test-inline-struct/inline.c: add mrb_istruct_p() checks.
This commit is contained in:
@@ -59,7 +59,7 @@ istruct_test_test_receive_direct(mrb_state *mrb, mrb_value self)
|
||||
mrb_value is;
|
||||
struct RClass *klass = mrb_class_get(mrb, "InlineStructTest");
|
||||
mrb_get_args(mrb, "o", &is);
|
||||
if (mrb_obj_is_kind_of(mrb, is, klass)) {
|
||||
if (mrb_istruct_p(is) && mrb_obj_is_kind_of(mrb, is, klass)) {
|
||||
char *ptr = mrb_istruct_ptr(is);;
|
||||
return mrb_bool_value(ptr[0] == 's');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user