* 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
This commit is contained in:
parent
854520fc1e
commit
8e5374d05a
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jul 19 14:56:00 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* 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@callcc.net>
|
Fri Jul 19 14:19:48 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
* ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
|
* ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
|
||||||
|
11
array.c
11
array.c
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
#define RGENGC_UNPROTECT_LOGGING 0
|
#define RGENGC_UNPROTECT_LOGGING 0
|
||||||
#if RGENGC_UNPROTECT_LOGGING
|
#if RGENGC_UNPROTECT_LOGGING
|
||||||
static void ary_unprotect_logging(unsigned long x, const char *filename, int line);
|
static void ary_unprotect_logging(void *x, const char *filename, int line);
|
||||||
#define RGENGC_LOGGING_WB_UNPROTECT ary_unprotect_logging
|
#define RGENGC_LOGGING_WB_UNPROTECT(x, f, l) ary_unprotect_logging((void *)x, f, l)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ruby/ruby.h"
|
#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))
|
#define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE))
|
||||||
|
|
||||||
#if RGENGC_UNPROTECT_LOGGING
|
#if RGENGC_UNPROTECT_LOGGING
|
||||||
static void ary_unprotect_logging(VALUE x, const char *filename, int line);
|
|
||||||
static st_table *ary_unprotect_logging_table;
|
static st_table *ary_unprotect_logging_table;
|
||||||
|
|
||||||
static void
|
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];
|
char buff[0x100];
|
||||||
st_data_t cnt = 1;
|
st_data_t cnt = 1;
|
||||||
char *ptr = buff;
|
char *ptr = buff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user