diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-08-20 18:49:55 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-08-20 18:49:55 +0900 |
| commit | 8157672a29e50756b9709022e8f66da73cd92c2b (patch) | |
| tree | 3fbec1e5e92d6c1a5fc3f28d9f649f2a17ea2fdc /src/gc.c | |
| parent | b836fd05dd084ac9e61c918cf1757b425c4d271b (diff) | |
| download | mruby-8157672a29e50756b9709022e8f66da73cd92c2b.tar.gz mruby-8157672a29e50756b9709022e8f66da73cd92c2b.zip | |
Use `RBasic` padding for embedded string on 64-bit CPU
On 64-bit CPU, there is padding in `RBasic`, so reorder the fields and use
it as buffer of embedded string. This change allows 4 more bytes to be
embedded on 64-bit CPU.
However, an incompatibility will occur if `RString::as::ary` is accessed
directly because `RString` structure has changed.
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -521,7 +521,7 @@ MRB_API struct RBasic* mrb_obj_alloc(mrb_state *mrb, enum mrb_vtype ttype, struct RClass *cls) { struct RBasic *p; - static const RVALUE RVALUE_zero = { { { MRB_TT_FALSE } } }; + static const RVALUE RVALUE_zero = { { { NULL, NULL, MRB_TT_FALSE } } }; mrb_gc *gc = &mrb->gc; if (cls) { |
