summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-19 06:00:28 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-19 06:00:28 +0000
commit8e5374d05a9cddc11ef8871eb34bb59109fa272a (patch)
tree92dde725c22394ab52912d286e91a75eee9df603 /array.c
parent854520fc1e5da3a5af12ed01608c5626b81b7996 (diff)
* array.c (ary_unprotect_logging): use (void *) for first parameter
because VALUE is not defined before including ruby/ruby.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/array.c b/array.c
index d9488fc..e7d1581 100644
--- a/array.c
+++ b/array.c
@@ -13,8 +13,8 @@
#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;
#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;