From 2be65894e1c6aba3e1b58db8671ca36693c0b105 Mon Sep 17 00:00:00 2001 From: normal Date: Tue, 22 May 2018 01:42:21 +0000 Subject: 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 --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gc.c') 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) { -- cgit v1.2.3