diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-10-29 03:29:32 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-10-29 03:29:32 +0900 |
| commit | cfc1269d334a04a5dfb8a9b397c5716fe2ccffc1 (patch) | |
| tree | f9102952119045a9c56a9dac8766836361bc2a18 | |
| parent | c6c4da8c484e0e3ba748806b6616ca165fafe562 (diff) | |
| download | mruby-cfc1269d334a04a5dfb8a9b397c5716fe2ccffc1.tar.gz mruby-cfc1269d334a04a5dfb8a9b397c5716fe2ccffc1.zip | |
revert part of #507 for warning
| -rw-r--r-- | src/gc.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -326,7 +326,6 @@ struct RBasic* mrb_obj_alloc(mrb_state *mrb, enum mrb_vtype ttype, struct RClass *cls) { struct RBasic *p; - static const RVALUE RVALUE_zero = { 0 }; #ifdef MRB_GC_STRESS mrb_garbage_collect(mrb); @@ -346,7 +345,7 @@ mrb_obj_alloc(mrb_state *mrb, enum mrb_vtype ttype, struct RClass *cls) mrb->live++; gc_protect(mrb, p); - *(RVALUE *)p = RVALUE_zero; + memset(p, 0, sizeof(RVALUE)); p->tt = ttype; p->c = cls; paint_partial_white(mrb, p); |
