diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-08-16 22:05:58 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-08-16 22:05:58 +0900 |
| commit | 9832e91304347a12e4a2fc53d38a0b1f2486b958 (patch) | |
| tree | 5ea28204620384d800b1995d1317c99bdde0aa89 /src/gc.c | |
| parent | 8fa9a7b96514524403ea46450e75aada23749051 (diff) | |
| download | mruby-9832e91304347a12e4a2fc53d38a0b1f2486b958.tar.gz mruby-9832e91304347a12e4a2fc53d38a0b1f2486b958.zip | |
SHARED/FSHARED string is not required when sharing NOFREE string
I think the string buffer of NOFREE string always exists and does not need
to be released, so it can be shared as another NOFREE string.
Also changed the `mrb_shared_string` field order so that eliminate padding if
`int` and `mrb_int` sizes are less than pointer size.
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -748,7 +748,7 @@ gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj) break; case MRB_TT_STRING: - if (RSTR_FSHARED_P(obj) && !RSTR_NOFREE_P(obj)) { + if (RSTR_FSHARED_P(obj)) { struct RString *s = (struct RString*)obj; mrb_gc_mark(mrb, (struct RBasic*)s->as.heap.aux.fshared); } |
