summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-02 21:34:10 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-02 21:34:10 +0900
commit34c049c63e4c4c011fe1cfcbe954f20438919439 (patch)
treed9562650cde9203c6302719d4a4e7ad3415ee7aa
parent54808d1df56599c2e7974e5f10eb2cae3ab3ddbc (diff)
downloadmruby-34c049c63e4c4c011fe1cfcbe954f20438919439.tar.gz
mruby-34c049c63e4c4c011fe1cfcbe954f20438919439.zip
remove unused mrb_mem_clear
-rw-r--r--include/mruby/array.h1
-rw-r--r--src/array.c8
-rw-r--r--src/struct.c4
3 files changed, 1 insertions, 12 deletions
diff --git a/include/mruby/array.h b/include/mruby/array.h
index 192ad7c4c..21d50152f 100644
--- a/include/mruby/array.h
+++ b/include/mruby/array.h
@@ -43,7 +43,6 @@ mrb_value mrb_ary_unshift(mrb_state *mrb, mrb_value self, mrb_value item);
mrb_value mrb_ary_new4(mrb_state *mrb, int n, const mrb_value *elts);
mrb_value mrb_assoc_new(mrb_state *mrb, mrb_value car, mrb_value cdr);
mrb_value mrb_ary_entry(mrb_value ary, int offset);
-void mrb_mem_clear(mrb_value *mem, int size);
mrb_value mrb_ary_tmp_new(mrb_state *mrb, int capa);
mrb_value mrb_ary_sort(mrb_state *mrb, mrb_value ary);
mrb_value mrb_ary_shift(mrb_state *mrb, mrb_value self);
diff --git a/src/array.c b/src/array.c
index 6d41c0c3c..ed207a2a2 100644
--- a/src/array.c
+++ b/src/array.c
@@ -769,14 +769,6 @@ mrb_ary_entry(mrb_value ary, int offset)
return ary_elt(ary, offset);
}
-void
-mrb_mem_clear(mrb_value *mem, int size)
-{
- while (size--) {
- *mem++ = mrb_nil_value();
- }
-}
-
mrb_value
mrb_ary_tmp_new(mrb_state *mrb, int capa)
{
diff --git a/src/struct.c b/src/struct.c
index fbe018930..9f7010e0b 100644
--- a/src/struct.c
+++ b/src/struct.c
@@ -419,9 +419,7 @@ mrb_struct_initialize_withArg(mrb_state *mrb, int argc, mrb_value *argv, mrb_val
st->ptr = mrb_malloc(mrb, sizeof(mrb_value)*argc);
st->len = n;
memcpy(st->ptr, argv, sizeof(mrb_value)*argc);
- //if (n > argc) {
- // mrb_mem_clear(RSTRUCT_PTR(self)+argc, n-argc);
- //}
+
return self;
}