ruby-changes:16982
From: nobu <ko1@a...>
Date: Sat, 14 Aug 2010 15:11:18 +0900 (JST)
Subject: [ruby-changes:16982] Ruby:r28979 (trunk): * gc.h (rb_objspace_each_objects): used in objspace.
nobu 2010-08-14 15:11:03 +0900 (Sat, 14 Aug 2010) New Revision: 28979 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28979 Log: * gc.h (rb_objspace_each_objects): used in objspace. Modified files: trunk/ChangeLog trunk/ext/objspace/objspace.c trunk/gc.h Index: ChangeLog =================================================================== --- ChangeLog (revision 28978) +++ ChangeLog (revision 28979) @@ -1,5 +1,7 @@ -Sat Aug 14 14:58:13 2010 Nobuyoshi Nakada <nobu@r...> +Sat Aug 14 15:11:01 2010 Nobuyoshi Nakada <nobu@r...> + * gc.h (rb_objspace_each_objects): used in objspace. + * vm_core.h (rb_{get,set,reset}_coverages): used in coverage. * include/ruby/intern.h (rb_time_interval): used in io/wait. Index: gc.h =================================================================== --- gc.h (revision 28978) +++ gc.h (revision 28979) @@ -21,13 +21,13 @@ #if RUBY_MARK_FREE_DEBUG extern int ruby_gc_debug_indent; -static void +static inline void rb_gc_debug_indent(void) { printf("%*s", ruby_gc_debug_indent, ""); } -static void +static inline void rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr) { if (st == 0) { @@ -82,4 +82,17 @@ #define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, a, b) #endif +#if defined __GNUC__ && __GNUC__ >= 4 +#pragma GCC visibility push(default) +#endif + +size_t rb_objspace_data_type_memsize(VALUE obj); +void rb_objspace_each_objects( + int (*callback)(void *start, void *end, size_t stride, void *data), + void *data); + +#if defined __GNUC__ && __GNUC__ >= 4 +#pragma GCC visibility pop +#endif + #endif /* RUBY_GC_H */ Index: ext/objspace/objspace.c =================================================================== --- ext/objspace/objspace.c (revision 28978) +++ ext/objspace/objspace.c (revision 28979) @@ -28,6 +28,7 @@ #include <ruby/io.h> #include <ruby/re.h> #include <../../node.h> +#include <../../gc.h> size_t rb_str_memsize(VALUE); size_t rb_ary_memsize(VALUE); @@ -36,10 +37,6 @@ size_t rb_generic_ivar_memsize(VALUE); size_t rb_objspace_data_type_memsize(VALUE obj); -void rb_objspace_each_objects( - int (*callback)(void *start, void *end, size_t stride, void *data), - void *data); - static size_t memsize_of(VALUE obj) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/