diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-09-14 19:51:52 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-09-14 23:21:44 +0900 |
| commit | 57d7fe94a9049c7abaa5b061a0f61a5f44815733 (patch) | |
| tree | 66034c80933797fbb59540e5c589a608fb3d01ae /src/string.c | |
| parent | 6f1c08f7d8a43a5d220aca7a5c449a8d04d3017b (diff) | |
| download | mruby-57d7fe94a9049c7abaa5b061a0f61a5f44815733.tar.gz mruby-57d7fe94a9049c7abaa5b061a0f61a5f44815733.zip | |
Add a macro `mrb_frozen_p` that points to `MRB_FROZEN_P`.
Diffstat (limited to 'src/string.c')
| -rw-r--r-- | src/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c index 2454eb0fb..7abb3148c 100644 --- a/src/string.c +++ b/src/string.c @@ -535,7 +535,7 @@ str_make_shared(mrb_state *mrb, struct RString *orig, struct RString *s) else if (RSTR_FSHARED_P(orig)) { str_init_fshared(orig, s, orig->as.heap.aux.fshared); } - else if (MRB_FROZEN_P(orig) && !RSTR_POOL_P(orig)) { + else if (mrb_frozen_p(orig) && !RSTR_POOL_P(orig)) { str_init_fshared(orig, s, orig); } else { @@ -2405,7 +2405,7 @@ mrb_string_value_cstr(mrb_state *mrb, mrb_value *ptr) if (p[len] == '\0') { return p; } - if (MRB_FROZEN_P(ps) || RSTR_CAPA(ps) == len) { + if (mrb_frozen_p(ps) || RSTR_CAPA(ps) == len) { ps = str_new(mrb, NULL, len+1); memcpy(RSTR_PTR(ps), p, len); RSTR_SET_LEN(ps, len); |
