diff options
| author | cremno <[email protected]> | 2014-06-05 01:31:15 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-06-05 01:31:15 +0200 |
| commit | 65a7eac1a9135ad1e2cdcc991fff63406b96f8c7 (patch) | |
| tree | 10558aa2f46bec1a0c7494b09fda93f45ee1aea5 /mrbgems/mruby-struct | |
| parent | 64b0e48dcbb65d77fe3da68ee2368394642445ba (diff) | |
| download | mruby-65a7eac1a9135ad1e2cdcc991fff63406b96f8c7.tar.gz mruby-65a7eac1a9135ad1e2cdcc991fff63406b96f8c7.zip | |
mruby-struct: remove unused functions
Diffstat (limited to 'mrbgems/mruby-struct')
| -rw-r--r-- | mrbgems/mruby-struct/src/struct.c | 34 |
1 files changed, 0 insertions, 34 deletions
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 <string.h> -#include <stdarg.h> #include "mruby.h" #include "mruby/array.h" #include "mruby/string.h" @@ -41,12 +40,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) { mrb_value members = struct_ivar_get(mrb, klass, mrb_intern_lit(mrb, "__members__")); @@ -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: @@ -436,12 +408,6 @@ mrb_struct_initialize_m(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value } 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) { const char *cn = mrb_class_name(mrb, mrb_obj_class(mrb, s)); |
