Merge pull request #2387 from suzukaze/refactor-nofree-p

Refactor how to use RSTR_NOFREE_P macro
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-06-12 07:31:09 +09:00
+1 -1
View File
@@ -302,7 +302,7 @@ mrb_gc_free_str(mrb_state *mrb, struct RString *str)
/* no code */;
else if (RSTR_SHARED_P(str))
str_decref(mrb, str->as.heap.aux.shared);
else if (RSTR_NOFREE_P(str) == 0)
else if (!RSTR_NOFREE_P(str))
mrb_free(mrb, str->as.heap.ptr);
}