ruby-changes:31441
From: nobu <ko1@a...>
Date: Sun, 3 Nov 2013 21:40:39 +0900 (JST)
Subject: [ruby-changes:31441] nobu:r43520 (trunk): gc.c: use boolean
nobu 2013-11-03 21:40:29 +0900 (Sun, 03 Nov 2013) New Revision: 43520 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43520 Log: gc.c: use boolean * gc.c (obj_free): use free_immediately as boolean. Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 43519) +++ gc.c (revision 43520) @@ -1355,13 +1355,13 @@ obj_free(rb_objspace_t *objspace, VALUE https://github.com/ruby/ruby/blob/trunk/gc.c#L1355 break; case T_DATA: if (DATA_PTR(obj)) { - int free_immediately = 0; + int free_immediately = FALSE; if (RTYPEDDATA_P(obj)) { - free_immediately = (int)(RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY); + free_immediately = (RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY) != 0; RDATA(obj)->dfree = RANY(obj)->as.typeddata.type->function.dfree; if (0 && free_immediately == 0) /* to expose non-free-immediate T_DATA */ - fprintf(stderr, "not immediate -> %s\n", RANY(obj)->as.typeddata.type->wrap_struct_name); + fprintf(stderr, "not immediate -> %s\n", RANY(obj)->as.typeddata.type->wrap_struct_name); } if (RANY(obj)->as.data.dfree == RUBY_DEFAULT_FREE) { xfree(DATA_PTR(obj)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/