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

ruby-changes:33922

From: naruse <ko1@a...>
Date: Sun, 18 May 2014 20:02:52 +0900 (JST)
Subject: [ruby-changes:33922] naruse:r46003 (trunk): fix type

naruse	2014-05-18 20:02:43 +0900 (Sun, 18 May 2014)

  New Revision: 46003

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

  Log:
    fix type
    
    struct RVALUE.file is const char*.
    struct RVALUE.line is int.

  Modified files:
    trunk/gc.c
Index: gc.c
===================================================================
--- gc.c	(revision 46002)
+++ gc.c	(revision 46003)
@@ -371,7 +371,7 @@ typedef struct RVALUE { https://github.com/ruby/ruby/blob/trunk/gc.c#L371
     } as;
 #if GC_DEBUG
     const char *file;
-    VALUE line;
+    int line;
 #endif
 } RVALUE;
 
@@ -7503,7 +7503,7 @@ rb_gcdebug_print_obj_condition(VALUE obj https://github.com/ruby/ruby/blob/trunk/gc.c#L7503
 {
     rb_objspace_t *objspace = &rb_objspace;
 
-    fprintf(stderr, "created at: %s:%d\n", RSTRING_PTR(RANY(obj)->file), FIX2INT(RANY(obj)->line));
+    fprintf(stderr, "created at: %s:%d\n", RANY(obj)->file, RANY(obj)->line);
 
     if (is_pointer_to_heap(objspace, (void *)obj)) {
         fprintf(stderr, "pointer to heap?: true\n");

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

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