diff options
| author | Paolo Bosetti <[email protected]> | 2012-08-16 10:12:40 +0200 |
|---|---|---|
| committer | Paolo Bosetti <[email protected]> | 2012-08-16 10:18:41 +0200 |
| commit | efa46146a58be501daf3a38a15ffa9e3ddc87508 (patch) | |
| tree | ce57dbd7dba008363513f881599783c1342cdd51 /src/dump.c | |
| parent | 441079557d8e78f33314aea14b31cc22932d0ff4 (diff) | |
| parent | 23e88dba6e9cfaded527f477341e7a7fe50e6795 (diff) | |
| download | mruby-efa46146a58be501daf3a38a15ffa9e3ddc87508.tar.gz mruby-efa46146a58be501daf3a38a15ffa9e3ddc87508.zip | |
Merge branch 'master' into XCode
Also, fixed issue in Xcode project build settings
Diffstat (limited to 'src/dump.c')
| -rw-r--r-- | src/dump.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dump.c b/src/dump.c index 230ba9bba..190f16027 100644 --- a/src/dump.c +++ b/src/dump.c @@ -224,13 +224,13 @@ get_pool_block_size(mrb_state *mrb, mrb_irep *irep, int type) uint16_t nlen =0; int len; - switch (irep->pool[pool_no].tt) { + switch (mrb_type(irep->pool[pool_no])) { case MRB_TT_FIXNUM: - len = sprintf( buf, "%d", irep->pool[pool_no].value.i); + len = sprintf( buf, "%d", mrb_fixnum(irep->pool[pool_no])); size += (uint32_t)len; break; case MRB_TT_FLOAT: - len = sprintf( buf, "%.16e", irep->pool[pool_no].value.f); + len = sprintf( buf, "%.16e", mrb_float(irep->pool[pool_no])); size += (uint32_t)len; break; case MRB_TT_STRING: @@ -343,16 +343,16 @@ write_pool_block(mrb_state *mrb, mrb_irep *irep, char *buf, int type) for (pool_no = 0; pool_no < irep->plen; pool_no++) { uint16_t nlen =0; - buf += uint8_dump(irep->pool[pool_no].tt, buf, type); /* data type */ + buf += uint8_dump(mrb_type(irep->pool[pool_no]), buf, type); /* data type */ memset(char_buf, 0, buf_size); - switch (irep->pool[pool_no].tt) { + switch (mrb_type(irep->pool[pool_no])) { case MRB_TT_FIXNUM: - sprintf(char_buf, "%d", irep->pool[pool_no].value.i); + sprintf(char_buf, "%d", mrb_fixnum(irep->pool[pool_no])); break; case MRB_TT_FLOAT: - sprintf(char_buf, "%.16e", irep->pool[pool_no].value.f); + sprintf(char_buf, "%.16e", mrb_float(irep->pool[pool_no])); break; case MRB_TT_STRING: |
