[前][次][番号順一覧][スレッド一覧]

ruby-changes:51280

From: normal <ko1@a...>
Date: Tue, 22 May 2018 10:42:28 +0900 (JST)
Subject: [ruby-changes:51280] normal:r63486 (trunk): gc.c: use RUBY_DEFAULT_FREE instead of open-coded constant

normal	2018-05-22 10:42:21 +0900 (Tue, 22 May 2018)

  New Revision: 63486

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63486

  Log:
    gc.c: use RUBY_DEFAULT_FREE instead of open-coded constant
    
    Improves readability and makes future changes easier

  Modified files:
    trunk/gc.c
Index: gc.c
===================================================================
--- gc.c	(revision 63485)
+++ gc.c	(revision 63486)
@@ -2978,7 +2978,7 @@ rb_objspace_call_finalizer(rb_objspace_t https://github.com/ruby/ruby/blob/trunk/gc.c#L2978
 		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) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]