diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-11-08 12:46:14 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-11-08 12:46:14 -0800 |
| commit | 8038ba8e277ed2c9e0c639c3a698fd3c74902770 (patch) | |
| tree | 3047ce3a67e3f4ee54e36653f6e19a3938ab33a4 /src | |
| parent | 862f3c39a80d427d9dfb8b2bfbe82dd33ab82051 (diff) | |
| parent | 4bbf7a3e12af8a8c4d7a34c19b3147bd0ade4eed (diff) | |
| download | mruby-8038ba8e277ed2c9e0c639c3a698fd3c74902770.tar.gz mruby-8038ba8e277ed2c9e0c639c3a698fd3c74902770.zip | |
Merge pull request #541 from xxuejie/master
Fix build on a c++ compiler
Diffstat (limited to 'src')
| -rw-r--r-- | src/gc.c | 2 | ||||
| -rw-r--r-- | src/state.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -325,7 +325,7 @@ struct RBasic* mrb_obj_alloc(mrb_state *mrb, enum mrb_vtype ttype, struct RClass *cls) { struct RBasic *p; - static const RVALUE RVALUE_zero = { { { 0 } } }; + static const RVALUE RVALUE_zero = { { { MRB_TT_FALSE } } }; #ifdef MRB_GC_STRESS mrb_garbage_collect(mrb); diff --git a/src/state.c b/src/state.c index 8bd222fb5..db31d7037 100644 --- a/src/state.c +++ b/src/state.c @@ -53,7 +53,7 @@ mrb_alloca(mrb_state *mrb, size_t size) { struct alloca_header *p; - p = mrb_malloc(mrb, sizeof(struct alloca_header)+size); + p = (struct alloca_header*) mrb_malloc(mrb, sizeof(struct alloca_header)+size); p->next = mrb->mems; mrb->mems = p; return (void*)p->buf; |
