summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-string-ext/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-string-ext/src/string.c')
-rw-r--r--mrbgems/mruby-string-ext/src/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-string-ext/src/string.c b/mrbgems/mruby-string-ext/src/string.c
index 48146944d..9c172081b 100644
--- a/mrbgems/mruby-string-ext/src/string.c
+++ b/mrbgems/mruby-string-ext/src/string.c
@@ -254,8 +254,8 @@ mrb_str_clear(mrb_state *mrb, mrb_value str)
struct RString *s = mrb_str_ptr(str);
if (!RSTR_SHARED_P(s) && !RSTR_EMBED_P(s)) {
- if (s->flags & MRB_STR_NOFREE) {
- s->flags &= ~MRB_STR_NOFREE;
+ if (RSTR_NOFREE_P(s)) {
+ RSTR_UNSET_NOFREE_FLAG(s);
}
else {
mrb_free(mrb, s->as.heap.ptr);