From 4ffea85b62d49944524f4b5211b79f3009b8d3bd Mon Sep 17 00:00:00 2001 From: cremno Date: Thu, 13 Feb 2014 13:36:55 +0100 Subject: hash / hash-ext: various small changes src/hash.c: - mrb_hash_(aget|aset|dup|delete): internal linkage - remove documentation of methods which are not implemented (in here) - remove #assoc; unused, not in ISO spec - remove #rassoc: same, implementation is also wrong hash-ext mrbgem: - remove header "mruby/khash.h" - remove mrb_hash_values_at (move code into hash_values_at, i: long -> int) - less whitespace in gem_init function --- mrbgems/mruby-hash-ext/src/hash-ext.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'mrbgems/mruby-hash-ext/src/hash-ext.c') diff --git a/mrbgems/mruby-hash-ext/src/hash-ext.c b/mrbgems/mruby-hash-ext/src/hash-ext.c index c6e72f451..298559686 100644 --- a/mrbgems/mruby-hash-ext/src/hash-ext.c +++ b/mrbgems/mruby-hash-ext/src/hash-ext.c @@ -7,7 +7,6 @@ #include "mruby.h" #include "mruby/array.h" #include "mruby/hash.h" -#include "mruby/khash.h" /* * call-seq: @@ -20,27 +19,18 @@ * h.values_at("cow", "cat") #=> ["bovine", "feline"] */ -mrb_value -mrb_hash_values_at(mrb_state *mrb, int argc, mrb_value *argv, mrb_value hash) -{ - mrb_value result = mrb_ary_new_capa(mrb, argc); - long i; - - for (i=0; ihash_class; - - mrb_define_method(mrb, h, "values_at", hash_values_at, MRB_ARGS_ANY()); + mrb_define_method(mrb, h, "values_at", hash_values_at, MRB_ARGS_ANY()); } void -- cgit v1.2.3