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

ruby-changes:31437

From: nobu <ko1@a...>
Date: Sun, 3 Nov 2013 10:37:26 +0900 (JST)
Subject: [ruby-changes:31437] nobu:r43516 (trunk): gc.c: suppress warning

nobu	2013-11-03 10:37:22 +0900 (Sun, 03 Nov 2013)

  New Revision: 43516

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43516

  Log:
    gc.c: suppress warning
    
    * gc.c (obj_free): suppress a false shorten-64-to-32 warning,
      RUBY_TYPED_FREE_IMMEDIATELY never exceed the limit of int.

  Modified files:
    trunk/gc.c
Index: gc.c
===================================================================
--- gc.c	(revision 43515)
+++ gc.c	(revision 43516)
@@ -1358,7 +1358,7 @@ obj_free(rb_objspace_t *objspace, VALUE https://github.com/ruby/ruby/blob/trunk/gc.c#L1358
 	    int free_immediately = 0;
 
 	    if (RTYPEDDATA_P(obj)) {
-		free_immediately = RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY;
+		free_immediately = (int)(RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY);
 		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);

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

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