From 33ebcb053809f36a5a244cd587349389958c4d33 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 24 Jul 2013 09:42:43 +0000 Subject: * array.c, gc.c: move ary_unprotect_logging() into rb_gc_unprotect_logging() which is general version * include/ruby/ruby.h: add USE_RGENGC_LOGGING_WB_UNPROTECT to enable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 17f9ba3f41..7bfc0b261c 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1266,11 +1266,16 @@ void rb_gc_writebarrier_unprotect_promoted(VALUE obj); #define OBJ_WRITE(a, slot, b) rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__) #define OBJ_WRITTEN(a, oldv, b) rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__) +#if USE_RGENGC_LOGGING_WB_UNPROTECT +void rb_gc_unprotect_logging(void *objptr, const char *filename, int line); +#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging +#endif + static inline VALUE rb_obj_wb_unprotect(VALUE x, const char *filename, int line) { #ifdef RGENGC_LOGGING_WB_UNPROTECT - RGENGC_LOGGING_WB_UNPROTECT(x, filename, line); + RGENGC_LOGGING_WB_UNPROTECT((void *)x, filename, line); #endif #if USE_RGENGC -- cgit v1.2.3