LoginSignup
1
1

More than 5 years have passed since last update.

mrb_funcallでモジュールの中のクラスメソッドを呼び出すには

Posted at

mrb_funcallでモジュールの中のクラスメソッドを呼び出す

自分の検索能力が低いせいか苦労したので、メモ。

struct RClass *my_module;

my_module = mrb_module_get(mrb, "SugoiModule");
val = mrb_funcall(mrb,mrb_obj_value(mrb_class_get_under(mrb, my_module, "Util")),"sugoi_classmethod", 0, NULL);
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1