mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6b6293bc1
commit
87af442f94
11 changed files with 37 additions and 35 deletions
2
debug.c
2
debug.c
|
@ -27,7 +27,6 @@ const union {
|
||||||
enum {
|
enum {
|
||||||
RUBY_ENCODING_INLINE_MAX = ENCODING_INLINE_MAX,
|
RUBY_ENCODING_INLINE_MAX = ENCODING_INLINE_MAX,
|
||||||
RUBY_ENCODING_SHIFT = ENCODING_SHIFT,
|
RUBY_ENCODING_SHIFT = ENCODING_SHIFT,
|
||||||
RUBY_ENCODING_MASK = ENCODING_MASK,
|
|
||||||
RUBY_ENC_CODERANGE_MASK = ENC_CODERANGE_MASK,
|
RUBY_ENC_CODERANGE_MASK = ENC_CODERANGE_MASK,
|
||||||
RUBY_ENC_CODERANGE_UNKNOWN = ENC_CODERANGE_UNKNOWN,
|
RUBY_ENC_CODERANGE_UNKNOWN = ENC_CODERANGE_UNKNOWN,
|
||||||
RUBY_ENC_CODERANGE_7BIT = ENC_CODERANGE_7BIT,
|
RUBY_ENC_CODERANGE_7BIT = ENC_CODERANGE_7BIT,
|
||||||
|
@ -70,6 +69,7 @@ const union {
|
||||||
|
|
||||||
const VALUE RUBY_FL_USER19 = FL_USER19;
|
const VALUE RUBY_FL_USER19 = FL_USER19;
|
||||||
const SIGNED_VALUE RUBY_NODE_LMASK = NODE_LMASK;
|
const SIGNED_VALUE RUBY_NODE_LMASK = NODE_LMASK;
|
||||||
|
const VALUE RUBY_ENCODING_MASK = ENCODING_MASK;
|
||||||
|
|
||||||
int
|
int
|
||||||
ruby_debug_print_indent(int level, int debug_level, int indent_level)
|
ruby_debug_print_indent(int level, int debug_level, int indent_level)
|
||||||
|
|
2
dln.c
2
dln.c
|
@ -1316,7 +1316,7 @@ dln_load(const char *file)
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_fct = (void(*)())dlsym(handle, buf);
|
init_fct = (void(*)())(VALUE)dlsym(handle, buf);
|
||||||
#if defined __SYMBIAN32__
|
#if defined __SYMBIAN32__
|
||||||
if (init_fct == NULL) {
|
if (init_fct == NULL) {
|
||||||
init_fct = (void(*)())dlsym(handle, "1"); /* Some Symbian versions do not support symbol table in DLL, ordinal numbers only */
|
init_fct = (void(*)())dlsym(handle, "1"); /* Some Symbian versions do not support symbol table in DLL, ordinal numbers only */
|
||||||
|
|
|
@ -82,7 +82,7 @@ rb_dlcfunc_new(void (*func)(), int type, const char *name, ID calltype)
|
||||||
rb_secure(4);
|
rb_secure(4);
|
||||||
if( func ){
|
if( func ){
|
||||||
val = TypedData_Make_Struct(rb_cDLCFunc, struct cfunc_data, &dlcfunc_data_type, data);
|
val = TypedData_Make_Struct(rb_cDLCFunc, struct cfunc_data, &dlcfunc_data_type, data);
|
||||||
data->ptr = func;
|
data->ptr = (void *)(VALUE)func;
|
||||||
data->name = name ? strdup(name) : NULL;
|
data->name = name ? strdup(name) : NULL;
|
||||||
data->type = type;
|
data->type = type;
|
||||||
data->calltype = calltype;
|
data->calltype = calltype;
|
||||||
|
@ -306,9 +306,11 @@ rb_dlcfunc_inspect(VALUE self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# define DECL_FUNC_CDECL(f,ret,args) ret (FUNC_CDECL(*f))(args)
|
# define DECL_FUNC_CDECL(f,ret,args,val) \
|
||||||
|
ret (FUNC_CDECL(*f))(args) = (ret (FUNC_CDECL(*))(args))(VALUE)(val)
|
||||||
#ifdef FUNC_STDCALL
|
#ifdef FUNC_STDCALL
|
||||||
# define DECL_FUNC_STDCALL(f,ret,args) ret (FUNC_STDCALL(*f))(args)
|
# define DECL_FUNC_STDCALL(f,ret,args,val) \
|
||||||
|
ret (FUNC_STDCALL(*f))(args) = (ret (FUNC_STDCALL(*))(args))(VALUE)(val)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CALL_CASE switch( RARRAY_LEN(ary) ){ \
|
#define CALL_CASE switch( RARRAY_LEN(ary) ){ \
|
||||||
|
@ -376,7 +378,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
switch( cfunc->type ){
|
switch( cfunc->type ){
|
||||||
case DLTYPE_VOID:
|
case DLTYPE_VOID:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,void,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,void,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
f(DLSTACK_ARGS##n(stack)); \
|
f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = Qnil; \
|
result = Qnil; \
|
||||||
}
|
}
|
||||||
|
@ -385,7 +387,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_VOIDP:
|
case DLTYPE_VOIDP:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,void*,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,void*,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
void * ret; \
|
void * ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = PTR2NUM(ret); \
|
result = PTR2NUM(ret); \
|
||||||
|
@ -395,7 +397,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_CHAR:
|
case DLTYPE_CHAR:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,char,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,char,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
char ret; \
|
char ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = CHR2FIX(ret); \
|
result = CHR2FIX(ret); \
|
||||||
|
@ -405,7 +407,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_SHORT:
|
case DLTYPE_SHORT:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,short,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,short,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
short ret; \
|
short ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = INT2NUM((int)ret); \
|
result = INT2NUM((int)ret); \
|
||||||
|
@ -415,7 +417,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_INT:
|
case DLTYPE_INT:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,int,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,int,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
int ret; \
|
int ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = INT2NUM(ret); \
|
result = INT2NUM(ret); \
|
||||||
|
@ -425,7 +427,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_LONG:
|
case DLTYPE_LONG:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,long,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,long,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
long ret; \
|
long ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = LONG2NUM(ret); \
|
result = LONG2NUM(ret); \
|
||||||
|
@ -436,7 +438,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
#if HAVE_LONG_LONG /* used in ruby.h */
|
#if HAVE_LONG_LONG /* used in ruby.h */
|
||||||
case DLTYPE_LONG_LONG:
|
case DLTYPE_LONG_LONG:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,LONG_LONG,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,LONG_LONG,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
LONG_LONG ret; \
|
LONG_LONG ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = LL2NUM(ret); \
|
result = LL2NUM(ret); \
|
||||||
|
@ -447,7 +449,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
#endif
|
#endif
|
||||||
case DLTYPE_FLOAT:
|
case DLTYPE_FLOAT:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,float,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,float,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
float ret; \
|
float ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = rb_float_new(ret); \
|
result = rb_float_new(ret); \
|
||||||
|
@ -457,7 +459,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_DOUBLE:
|
case DLTYPE_DOUBLE:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_CDECL(f,double,DLSTACK_PROTO##n) = cfunc->ptr; \
|
DECL_FUNC_CDECL(f,double,DLSTACK_PROTO##n,cfunc->ptr); \
|
||||||
double ret; \
|
double ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = rb_float_new(ret); \
|
result = rb_float_new(ret); \
|
||||||
|
@ -475,7 +477,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
switch( cfunc->type ){
|
switch( cfunc->type ){
|
||||||
case DLTYPE_VOID:
|
case DLTYPE_VOID:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,void,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,void,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
f(DLSTACK_ARGS##n(stack)); \
|
f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = Qnil; \
|
result = Qnil; \
|
||||||
}
|
}
|
||||||
|
@ -484,7 +486,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_VOIDP:
|
case DLTYPE_VOIDP:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,void*,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,void*,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
void * ret; \
|
void * ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = PTR2NUM(ret); \
|
result = PTR2NUM(ret); \
|
||||||
|
@ -494,7 +496,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_CHAR:
|
case DLTYPE_CHAR:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,char,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,char,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
char ret; \
|
char ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = CHR2FIX(ret); \
|
result = CHR2FIX(ret); \
|
||||||
|
@ -504,7 +506,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_SHORT:
|
case DLTYPE_SHORT:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,short,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,short,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
short ret; \
|
short ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = INT2NUM((int)ret); \
|
result = INT2NUM((int)ret); \
|
||||||
|
@ -514,7 +516,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_INT:
|
case DLTYPE_INT:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,int,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,int,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
int ret; \
|
int ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = INT2NUM(ret); \
|
result = INT2NUM(ret); \
|
||||||
|
@ -524,7 +526,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_LONG:
|
case DLTYPE_LONG:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,long,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,long,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
long ret; \
|
long ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = LONG2NUM(ret); \
|
result = LONG2NUM(ret); \
|
||||||
|
@ -535,7 +537,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
#if HAVE_LONG_LONG /* used in ruby.h */
|
#if HAVE_LONG_LONG /* used in ruby.h */
|
||||||
case DLTYPE_LONG_LONG:
|
case DLTYPE_LONG_LONG:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,LONG_LONG,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,LONG_LONG,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
LONG_LONG ret; \
|
LONG_LONG ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = LL2NUM(ret); \
|
result = LL2NUM(ret); \
|
||||||
|
@ -546,7 +548,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
#endif
|
#endif
|
||||||
case DLTYPE_FLOAT:
|
case DLTYPE_FLOAT:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,float,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,float,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
float ret; \
|
float ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = rb_float_new(ret); \
|
result = rb_float_new(ret); \
|
||||||
|
@ -556,7 +558,7 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
|
||||||
break;
|
break;
|
||||||
case DLTYPE_DOUBLE:
|
case DLTYPE_DOUBLE:
|
||||||
#define CASE(n) case n: { \
|
#define CASE(n) case n: { \
|
||||||
DECL_FUNC_STDCALL(f,double,DLSTACK_PROTO##n##_) = cfunc->ptr; \
|
DECL_FUNC_STDCALL(f,double,DLSTACK_PROTO##n##_,cfunc->ptr); \
|
||||||
double ret; \
|
double ret; \
|
||||||
ret = f(DLSTACK_ARGS##n(stack)); \
|
ret = f(DLSTACK_ARGS##n(stack)); \
|
||||||
result = rb_float_new(ret); \
|
result = rb_float_new(ret); \
|
||||||
|
|
|
@ -16,9 +16,9 @@ get_freefunc(VALUE func)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (rb_dlcfunc_kind_p(func)) {
|
if (rb_dlcfunc_kind_p(func)) {
|
||||||
return RCFUNC_DATA(func)->ptr;
|
return (freefunc_t)(VALUE)RCFUNC_DATA(func)->ptr;
|
||||||
}
|
}
|
||||||
return NUM2PTR(rb_Integer(func));
|
return (freefunc_t)(VALUE)NUM2PTR(rb_Integer(func));
|
||||||
}
|
}
|
||||||
|
|
||||||
static ID id_to_ptr;
|
static ID id_to_ptr;
|
||||||
|
|
|
@ -305,7 +305,7 @@ dlhandle_sym(void *handle, const char *name)
|
||||||
void (*func)();
|
void (*func)();
|
||||||
|
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
func = dlsym(handle, name);
|
func = (void (*)())(VALUE)dlsym(handle, name);
|
||||||
CHECK_DLERROR;
|
CHECK_DLERROR;
|
||||||
#if defined(FUNC_STDCALL)
|
#if defined(FUNC_STDCALL)
|
||||||
if( !func ){
|
if( !func ){
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# include <unistd.h> /* for read(), and write() */
|
# include <unistd.h> /* for read(), and write() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define numberof(ary) (sizeof(ary)/sizeof(ary[0]))
|
#define numberof(ary) (int)(sizeof(ary)/sizeof(ary[0]))
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# define TO_SOCKET(s) _get_osfhandle(s)
|
# define TO_SOCKET(s) _get_osfhandle(s)
|
||||||
|
@ -103,7 +103,7 @@ struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
SSL_METHOD *(*func)(void);
|
SSL_METHOD *(*func)(void);
|
||||||
} ossl_ssl_method_tab[] = {
|
} ossl_ssl_method_tab[] = {
|
||||||
#define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
|
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
|
||||||
OSSL_SSL_METHOD_ENTRY(TLSv1),
|
OSSL_SSL_METHOD_ENTRY(TLSv1),
|
||||||
OSSL_SSL_METHOD_ENTRY(TLSv1_server),
|
OSSL_SSL_METHOD_ENTRY(TLSv1_server),
|
||||||
OSSL_SSL_METHOD_ENTRY(TLSv1_client),
|
OSSL_SSL_METHOD_ENTRY(TLSv1_client),
|
||||||
|
@ -1428,7 +1428,7 @@ ossl_ssl_get_cipher(VALUE self)
|
||||||
rb_warning("SSL session is not started yet.");
|
rb_warning("SSL session is not started yet.");
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
cipher = SSL_get_current_cipher(ssl);
|
cipher = (SSL_CIPHER *)SSL_get_current_cipher(ssl);
|
||||||
|
|
||||||
return ossl_ssl_cipher_to_ary(cipher);
|
return ossl_ssl_cipher_to_ary(cipher);
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,8 +262,7 @@ ancillary_unix_rights(VALUE self)
|
||||||
if (level != SOL_SOCKET || type != SCM_RIGHTS)
|
if (level != SOL_SOCKET || type != SCM_RIGHTS)
|
||||||
rb_raise(rb_eTypeError, "SCM_RIGHTS ancillary data expected");
|
rb_raise(rb_eTypeError, "SCM_RIGHTS ancillary data expected");
|
||||||
|
|
||||||
VALUE v = rb_attr_get(self, rb_intern("unix_rights"));
|
return rb_attr_get(self, rb_intern("unix_rights"));
|
||||||
return v;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define ancillary_unix_rights rb_f_notimplement
|
#define ancillary_unix_rights rb_f_notimplement
|
||||||
|
|
|
@ -472,9 +472,9 @@ static VALUE
|
||||||
unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
|
unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
|
||||||
{
|
{
|
||||||
VALUE domain, type, protocol;
|
VALUE domain, type, protocol;
|
||||||
domain = INT2FIX(PF_UNIX);
|
|
||||||
VALUE args[3];
|
VALUE args[3];
|
||||||
|
|
||||||
|
domain = INT2FIX(PF_UNIX);
|
||||||
rb_scan_args(argc, argv, "02", &type, &protocol);
|
rb_scan_args(argc, argv, "02", &type, &protocol);
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
type = INT2FIX(SOCK_STREAM);
|
type = INT2FIX(SOCK_STREAM);
|
||||||
|
|
|
@ -82,6 +82,7 @@ typedef enum {
|
||||||
YAMLBYTE_E_WRITE = 'W', /* output stream write error */
|
YAMLBYTE_E_WRITE = 'W', /* output stream write error */
|
||||||
YAMLBYTE_E_OTHER = '?', /* some other error condition */
|
YAMLBYTE_E_OTHER = '?', /* some other error condition */
|
||||||
YAMLBYTE_E_PARSE = 'P', /* parse error, check bytecodes */
|
YAMLBYTE_E_PARSE = 'P', /* parse error, check bytecodes */
|
||||||
|
YAMLBYTE_MAX
|
||||||
} yamlbyte_result_t;
|
} yamlbyte_result_t;
|
||||||
|
|
||||||
typedef const yamlbyte_char_t *yamlbyte_buff_t;
|
typedef const yamlbyte_char_t *yamlbyte_buff_t;
|
||||||
|
|
4
gc.c
4
gc.c
|
@ -1808,7 +1808,7 @@ finalize_list(rb_objspace_t *objspace, RVALUE *p)
|
||||||
add_freelist(objspace, p);
|
add_freelist(objspace, p);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct heaps_slot *slot = (struct heaps_slot *)RDATA(p)->dmark;
|
struct heaps_slot *slot = (struct heaps_slot *)(VALUE)RDATA(p)->dmark;
|
||||||
slot->limit--;
|
slot->limit--;
|
||||||
}
|
}
|
||||||
p = tmp;
|
p = tmp;
|
||||||
|
@ -1908,7 +1908,7 @@ gc_sweep(rb_objspace_t *objspace)
|
||||||
RVALUE *pp;
|
RVALUE *pp;
|
||||||
|
|
||||||
for (pp = final_list; pp != final; pp = pp->as.free.next) {
|
for (pp = final_list; pp != final; pp = pp->as.free.next) {
|
||||||
RDATA(pp)->dmark = (void *)&heaps[i];
|
RDATA(pp)->dmark = (void (*)())(VALUE)&heaps[i];
|
||||||
pp->as.free.flags |= FL_SINGLETON; /* freeing page mark */
|
pp->as.free.flags |= FL_SINGLETON; /* freeing page mark */
|
||||||
}
|
}
|
||||||
heaps[i].limit = final_num;
|
heaps[i].limit = final_num;
|
||||||
|
|
2
ruby.c
2
ruby.c
|
@ -369,7 +369,7 @@ ruby_init_loadpath_safe(int safe_level)
|
||||||
_execname(libpath, sizeof(libpath) - 1);
|
_execname(libpath, sizeof(libpath) - 1);
|
||||||
#elif defined(HAVE_DLADDR)
|
#elif defined(HAVE_DLADDR)
|
||||||
Dl_info dli;
|
Dl_info dli;
|
||||||
if (dladdr(expand_include_path, &dli)) {
|
if (dladdr((void *)(VALUE)expand_include_path, &dli)) {
|
||||||
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
|
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
|
||||||
char fbuf[MAXPATHLEN];
|
char fbuf[MAXPATHLEN];
|
||||||
char *f = dln_find_file_r(dli.dli_fname, getenv(PATH_ENV), fbuf, sizeof(fbuf));
|
char *f = dln_find_file_r(dli.dli_fname, getenv(PATH_ENV), fbuf, sizeof(fbuf));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue