From 65a7eac1a9135ad1e2cdcc991fff63406b96f8c7 Mon Sep 17 00:00:00 2001 From: cremno Date: Thu, 5 Jun 2014 01:31:15 +0200 Subject: mruby-struct: remove unused functions --- mrbgems/mruby-struct/src/struct.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'mrbgems/mruby-struct/src') diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 8b2b71513..3a0369ecb 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -5,7 +5,6 @@ */ #include -#include #include "mruby.h" #include "mruby/array.h" #include "mruby/string.h" @@ -40,12 +39,6 @@ struct_ivar_get(mrb_state *mrb, mrb_value c, mrb_sym id) } } -static mrb_value -mrb_struct_iv_get(mrb_state *mrb, mrb_value c, const char *name) -{ - return struct_ivar_get(mrb, c, mrb_intern_cstr(mrb, name)); -} - static mrb_value mrb_struct_s_members(mrb_state *mrb, mrb_value klass) { @@ -283,27 +276,6 @@ make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * k return nstr; } -static mrb_value -mrb_struct_define(mrb_state *mrb, const char *name, ...) -{ - va_list ar; - mrb_value nm, ary; - char *mem; - - if (!name) nm = mrb_nil_value(); - else nm = mrb_str_new_cstr(mrb, name); - ary = mrb_ary_new(mrb); - - va_start(ar, name); - while ((mem = va_arg(ar, char*)) != 0) { - mrb_sym slot = mrb_intern_cstr(mrb, mem); - mrb_ary_push(mrb, ary, mrb_symbol_value(slot)); - } - va_end(ar); - - return make_struct(mrb, nm, ary, struct_class(mrb)); -} - /* 15.2.18.3.1 */ /* * call-seq: @@ -435,12 +407,6 @@ mrb_struct_initialize_m(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value return mrb_struct_initialize_withArg(mrb, argc, argv, self); } -static mrb_value -mrb_struct_initialize(mrb_state *mrb, mrb_value self, mrb_value values) -{ - return mrb_struct_initialize_withArg(mrb, RARRAY_LEN(values), RARRAY_PTR(values), self); -} - static mrb_value inspect_struct(mrb_state *mrb, mrb_value s, mrb_bool recur) { -- cgit v1.2.3