Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove unused mrb_mem_clear

  • Loading branch information...
commit 34c049c63e4c4c011fe1cfcbe954f20438919439 1 parent 54808d1
@matz matz authored
Showing with 1 addition and 12 deletions.
  1. +0 −1  include/mruby/array.h
  2. +0 −8 src/array.c
  3. +1 −3 src/struct.c
View
1  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);
View
8 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)
{
View
4 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.