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

ruby-changes:38618

From: ko1 <ko1@a...>
Date: Mon, 1 Jun 2015 04:12:58 +0900 (JST)
Subject: [ruby-changes:38618] ko1:r50699 (trunk): * gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.

ko1	2015-06-01 04:12:42 +0900 (Mon, 01 Jun 2015)

  New Revision: 50699

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

  Log:
    * gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/gc.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50698)
+++ ChangeLog	(revision 50699)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun  1 04:11:48 2015  Koichi Sasada  <ko1@a...>
+
+	* gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.
+
 Mon Jun  1 03:52:55 2015  Koichi Sasada  <ko1@a...>
 
 	* test/ruby/test_gc.rb: increase timeout seconds for GC stressful
Index: gc.c
===================================================================
--- gc.c	(revision 50698)
+++ gc.c	(revision 50699)
@@ -8975,6 +8975,17 @@ obj_info(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L8975
 }
 #endif
 
+const char *
+rb_obj_info(VALUE obj)
+{
+    if (!rb_special_const_p(obj)) {
+	return obj_info(obj);
+    }
+    else {
+	return obj_type_name(obj);
+    }
+}
+
 #if GC_DEBUG
 
 void
Index: gc.h
===================================================================
--- gc.h	(revision 50698)
+++ gc.h	(revision 50699)
@@ -83,6 +83,8 @@ int ruby_get_stack_grow_direction(volati https://github.com/ruby/ruby/blob/trunk/gc.h#L83
 #endif
 #define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
 
+const char *rb_obj_info(VALUE obj);
+
 RUBY_SYMBOL_EXPORT_BEGIN
 
 /* exports for objspace module */

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

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