aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-22 01:42:21 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-22 01:42:21 +0000
commit480cd383f4a1c9885e934f677eda3c070cc12e34 (patch)
treec8771bbc2da4846857b1c91ccfdd2ef3eb98314d /gc.c
parentd1cf559b283e8e080358181a426b18c899e97874 (diff)
downloadruby-480cd383f4a1c9885e934f677eda3c070cc12e34.tar.gz
gc.c: use RUBY_DEFAULT_FREE instead of open-coded constant
Improves readability and makes future changes easier git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 7518754ae5..4ebae169ec 100644
--- a/gc.c
+++ b/gc.c
@@ -2978,7 +2978,7 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
if (RTYPEDDATA_P(p)) {
RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
}
- if (RANY(p)->as.data.dfree == (RUBY_DATA_FUNC)-1) {
+ if (RANY(p)->as.data.dfree == RUBY_DEFAULT_FREE) {
xfree(DATA_PTR(p));
}
else if (RANY(p)->as.data.dfree) {