ruby-changes:30009
From: ko1 <ko1@a...>
Date: Fri, 19 Jul 2013 15:01:26 +0900 (JST)
Subject: [ruby-changes:30009] ko1:r42061 (trunk): * array.c (ary_unprotect_logging): use (void *) for first parameter
ko1 2013-07-19 15:00:28 +0900 (Fri, 19 Jul 2013) New Revision: 42061 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42061 Log: * array.c (ary_unprotect_logging): use (void *) for first parameter because VALUE is not defined before including ruby/ruby.h. Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 42060) +++ array.c (revision 42061) @@ -13,8 +13,8 @@ https://github.com/ruby/ruby/blob/trunk/array.c#L13 #define RGENGC_UNPROTECT_LOGGING 0 #if RGENGC_UNPROTECT_LOGGING -static void ary_unprotect_logging(unsigned long x, const char *filename, int line); -#define RGENGC_LOGGING_WB_UNPROTECT ary_unprotect_logging +static void ary_unprotect_logging(void *x, const char *filename, int line); +#define RGENGC_LOGGING_WB_UNPROTECT(x, f, l) ary_unprotect_logging((void *)x, f, l) #endif #include "ruby/ruby.h" @@ -38,13 +38,14 @@ static ID id_cmp, id_div, id_power; https://github.com/ruby/ruby/blob/trunk/array.c#L38 #define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE)) #if RGENGC_UNPROTECT_LOGGING -static void ary_unprotect_logging(VALUE x, const char *filename, int line); static st_table *ary_unprotect_logging_table; static void -ary_unprotect_logging(VALUE x, const char *filename, int line) +ary_unprotect_logging(void *objptr, const char *filename, int line) { - if (OBJ_WB_PROTECTED(x)) { + VALUE obj = (VALUE)objptr; + + if (OBJ_WB_PROTECTED(obj)) { char buff[0x100]; st_data_t cnt = 1; char *ptr = buff; Index: ChangeLog =================================================================== --- ChangeLog (revision 42060) +++ ChangeLog (revision 42061) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 19 14:56:00 2013 Koichi Sasada <ko1@a...> + + * array.c (ary_unprotect_logging): use (void *) for first parameter + because VALUE is not defined before including ruby/ruby.h. + Fri Jul 19 14:19:48 2013 Kazuki Tsujimoto <kazuki@c...> * ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/