Sha256: 2bd1a43eca56b7c11e46ece93e02d3add796e3c589f99add8a9d2ca35c9a90cf
Contents?: true
Size: 471 Bytes
Versions: 36
Compression:
Stored size: 471 Bytes
Contents
#include <mruby.h> #include <stdio.h> static mrb_value mrb_c_method(mrb_state *mrb, mrb_value self) { puts("A C Extension"); return self; } void mrb_c_and_ruby_extension_example_gem_init(mrb_state* mrb) { struct RClass *class_cextension = mrb_define_module(mrb, "CRubyExtension"); mrb_define_class_method(mrb, class_cextension, "c_method", mrb_c_method, MRB_ARGS_NONE()); } void mrb_c_and_ruby_extension_example_gem_final(mrb_state* mrb) { /* finalizer */ }
Version data entries
36 entries across 36 versions & 3 rubygems