From 4876dd3fb1715b4ea11051532ed3a3c2e6b0a628 Mon Sep 17 00:00:00 2001 From: tmm1 Date: Thu, 5 Dec 2013 10:30:38 +0000 Subject: gc.c: add GC.latest_gc_info() * gc.c (struct rb_objspace): rename internal last_collection_flags to latest_gc_info * gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar behavior to GC.stat() * gc.c (rb_gc_latest_gc_info): new c-api for above * gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat * gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags * include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about new api * gc.c (gc_stat_internal): raise TypeError on wrong type * gc.c (gc_stat): fix error message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index cc13557c4e..e6829c2be2 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -487,6 +487,7 @@ VALUE rb_define_finalizer(VALUE, VALUE); VALUE rb_undefine_finalizer(VALUE); size_t rb_gc_count(void); size_t rb_gc_stat(VALUE); +VALUE rb_gc_latest_gc_info(VALUE); /* hash.c */ void st_foreach_safe(struct st_table *, int (*)(ANYARGS), st_data_t); VALUE rb_check_hash_type(VALUE); -- cgit v1.2.3