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

Version Path
script_core-0.2.7 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.6 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.5 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.4 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.3 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.2 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.1 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.2.0 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.1.1 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.1.0 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.0.6 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
script_core-0.0.5 ext/enterprise_script_service/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.2.0 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.1.5 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.1.4 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.1.3 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.1.2 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.1.1 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.1.0 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c
esruby-0.0.11 resources/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c