diff options
Diffstat (limited to 'web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example')
5 files changed, 0 insertions, 59 deletions
diff --git a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/README.md b/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/README.md deleted file mode 100644 index 0b428b0b6..000000000 --- a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/README.md +++ /dev/null @@ -1,4 +0,0 @@ -C and Ruby Extension Example -========= - -This is an example gem which implements a C and Ruby extension. diff --git a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake b/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake deleted file mode 100644 index 6b4595b35..000000000 --- a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake +++ /dev/null @@ -1,23 +0,0 @@ -MRuby::Gem::Specification.new('c_and_ruby_extension_example') do |spec| - spec.license = 'MIT' - spec.author = 'mruby developers' - - # Add compile flags - # spec.cc.flags << '' - - # Add cflags to all - # spec.mruby.cc.flags << '-g' - - # Add libraries - # spec.linker.libraries << 'external_lib' - - # Default build files - # spec.rbfiles = Dir.glob("#{dir}/mrblib/*.rb") - # spec.objs = Dir.glob("#{dir}/src/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) } - # spec.test_rbfiles = Dir.glob("#{dir}/test/*.rb") - # spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) } - # spec.test_preload = 'test/assert.rb' - - # Values accessible as TEST_ARGS inside test scripts - # spec.test_args = {'tmp_dir' => Dir::tmpdir} -end diff --git a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb b/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb deleted file mode 100644 index d3899c301..000000000 --- a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb +++ /dev/null @@ -1,5 +0,0 @@ -module CRubyExtension - def CRubyExtension.ruby_method - puts "A Ruby Extension" - end -end diff --git a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c b/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c deleted file mode 100644 index 7b780d016..000000000 --- a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c +++ /dev/null @@ -1,20 +0,0 @@ -#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 */ -} diff --git a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/test/example.rb b/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/test/example.rb deleted file mode 100644 index fffad710f..000000000 --- a/web/server/h2o/libh2o/deps/mruby/examples/mrbgems/c_and_ruby_extension_example/test/example.rb +++ /dev/null @@ -1,7 +0,0 @@ -assert('C and Ruby Extension Example 1') do - CRubyExtension.respond_to? :c_method -end - -assert('C and Ruby Extension Example 2') do - CRubyExtension.respond_to? :ruby_method -end |