зеркало из https://github.com/github/ruby.git
* dir.c: changed `foo (*bar)_((boo))' to `foo (*bar)(boo)`.
* enumerator.c, eval.c, gc.c, intern.h, io.c, process.c, ruby.c, ruby.h, signal.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6c32e232d9
Коммит
ca32aea6a2
|
@ -1,3 +1,10 @@
|
|||
Wed Sep 14 17:24:22 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* dir.c: changed `foo (*bar)_((boo))' to `foo (*bar)(boo)`.
|
||||
|
||||
* enumerator.c, eval.c, gc.c, intern.h, io.c, process.c, ruby.c,
|
||||
ruby.h, signal.c: ditto.
|
||||
|
||||
Wed Sep 14 15:06:22 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
|
||||
|
|
6
dir.c
6
dir.c
|
@ -896,7 +896,7 @@ do_stat(const char *path, struct stat *pst)
|
|||
{
|
||||
int ret = stat(path, pst);
|
||||
if (ret < 0 && errno != ENOENT)
|
||||
rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)path, 0);
|
||||
rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)path, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ do_lstat(const char *path, struct stat *pst)
|
|||
{
|
||||
int ret = lstat(path, pst);
|
||||
if (ret < 0 && errno != ENOENT)
|
||||
rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)path, 0);
|
||||
rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)path, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ do_opendir(const char *path)
|
|||
{
|
||||
DIR *dirp = opendir(path);
|
||||
if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
|
||||
rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)path, 0);
|
||||
rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)path, 0);
|
||||
|
||||
return dirp;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ struct enumerator {
|
|||
VALUE method;
|
||||
VALUE proc;
|
||||
VALUE args;
|
||||
VALUE (*iter)_((VALUE, struct enumerator *));
|
||||
VALUE (*iter)(VALUE, struct enumerator *);
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
12
eval.c
12
eval.c
|
@ -1589,7 +1589,7 @@ rb_eval_string(const char *str)
|
|||
VALUE
|
||||
rb_eval_string_protect(const char *str, int *state)
|
||||
{
|
||||
return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state);
|
||||
return rb_protect((VALUE (*)(VALUE))rb_eval_string, (VALUE)str, state);
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
@ -8540,7 +8540,7 @@ block_pass(VALUE self, NODE *node)
|
|||
struct block_arg arg;
|
||||
arg.self = self;
|
||||
arg.iter = node->nd_iter;
|
||||
return rb_block_pass((VALUE (*)_((VALUE)))call_block,
|
||||
return rb_block_pass((VALUE (*)(VALUE))call_block,
|
||||
(VALUE)&arg, rb_eval(self, node->nd_body));
|
||||
}
|
||||
|
||||
|
@ -9124,7 +9124,7 @@ rb_proc_new(
|
|||
VALUE val)
|
||||
{
|
||||
struct BLOCK *data;
|
||||
VALUE proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val);
|
||||
VALUE proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, func, val);
|
||||
|
||||
Data_Get_Struct(proc, struct BLOCK, data);
|
||||
data->body->nd_state = YIELD_FUNC_AVALUE;
|
||||
|
@ -9149,7 +9149,7 @@ method_proc(VALUE method)
|
|||
if (nd_type(mdata->body) == NODE_BMETHOD) {
|
||||
return mdata->body->nd_cval;
|
||||
}
|
||||
proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method);
|
||||
proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, bmcall, method);
|
||||
Data_Get_Struct(proc, struct BLOCK, bdata);
|
||||
bdata->body->nd_file = mdata->body->nd_file;
|
||||
nd_set_line(bdata->body, nd_line(mdata->body));
|
||||
|
@ -10445,7 +10445,7 @@ rb_thread_schedule(void)
|
|||
|
||||
if (rb_trap_pending) {
|
||||
int status;
|
||||
rb_protect((VALUE (*)_((VALUE)))rb_trap_exec, Qnil, &status);
|
||||
rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
|
||||
if (status) {
|
||||
rb_fd_term(&readfds);
|
||||
rb_fd_term(&writefds);
|
||||
|
@ -12825,7 +12825,7 @@ catch_i(VALUE tag)
|
|||
VALUE
|
||||
rb_catch(const char *tag, VALUE (*func) (/* ??? */), VALUE data)
|
||||
{
|
||||
return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data);
|
||||
return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
4
gc.c
4
gc.c
|
@ -1723,7 +1723,7 @@ run_final(VALUE obj)
|
|||
for (i=0; i<RARRAY(finalizers)->len; i++) {
|
||||
args[0] = RARRAY(finalizers)->ptr[i];
|
||||
if (!args[1]) args[1] = rb_ary_new3(1, objid);
|
||||
rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
|
||||
rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
|
||||
}
|
||||
if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
|
||||
for (i=0; i<RARRAY(table)->len; i++) {
|
||||
|
@ -1731,7 +1731,7 @@ run_final(VALUE obj)
|
|||
args[0] = RARRAY(final)->ptr[1];
|
||||
if (!args[1]) args[1] = rb_ary_new3(1, objid);
|
||||
args[2] = FIX2INT(RARRAY(final)->ptr[0]);
|
||||
rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
|
||||
rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
|
||||
}
|
||||
}
|
||||
rb_thread_critical = critical_save;
|
||||
|
|
2
intern.h
2
intern.h
|
@ -413,7 +413,7 @@ int rb_proc_exec_n(int, VALUE*, const char*);
|
|||
int rb_proc_exec(const char*);
|
||||
VALUE rb_check_argv(int, VALUE*);
|
||||
int rb_exec(const struct rb_exec_arg*);
|
||||
int rb_fork(int*, int (*)_((void*)), void*);
|
||||
int rb_fork(int*, int (*)(void*), void*);
|
||||
VALUE rb_f_exec(int,VALUE*);
|
||||
int rb_waitpid(int,int*,int);
|
||||
void rb_syswait(int);
|
||||
|
|
4
io.c
4
io.c
|
@ -459,7 +459,7 @@ rb_io_wait_readable(int f)
|
|||
rb_fd_set(f, &rfds);
|
||||
#ifdef HAVE_RB_FD_INIT
|
||||
rb_ensure(wait_readable, (VALUE)&rfds,
|
||||
(VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&rfds);
|
||||
(VALUE (*)(VALUE))rb_fd_term, (VALUE)&rfds);
|
||||
#else
|
||||
rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
|
||||
#endif
|
||||
|
@ -502,7 +502,7 @@ rb_io_wait_writable(int f)
|
|||
rb_fd_set(f, &wfds);
|
||||
#ifdef HAVE_RB_FD_INIT
|
||||
rb_ensure(wait_writable, (VALUE)&wfds,
|
||||
(VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&wfds);
|
||||
(VALUE (*)(VALUE))rb_fd_term, (VALUE)&wfds);
|
||||
#else
|
||||
rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
|
||||
#endif
|
||||
|
|
10
process.c
10
process.c
|
@ -1263,7 +1263,7 @@ rb_exec(const struct rb_exec_arg *e)
|
|||
#ifdef HAVE_FORK
|
||||
#ifdef FD_CLOEXEC
|
||||
#if SIZEOF_INT == SIZEOF_LONG
|
||||
#define proc_syswait (VALUE (*)_((VALUE)))rb_syswait
|
||||
#define proc_syswait (VALUE (*)(VALUE))rb_syswait
|
||||
#else
|
||||
static VALUE
|
||||
proc_syswait(pid)
|
||||
|
@ -1486,12 +1486,12 @@ rb_syswait(int pid)
|
|||
{
|
||||
static int overriding;
|
||||
#ifdef SIGHUP
|
||||
RETSIGTYPE (*hfunc)_((int));
|
||||
RETSIGTYPE (*hfunc)(int);
|
||||
#endif
|
||||
#ifdef SIGQUIT
|
||||
RETSIGTYPE (*qfunc)_((int));
|
||||
RETSIGTYPE (*qfunc)(int);
|
||||
#endif
|
||||
RETSIGTYPE (*ifunc)_((int));
|
||||
RETSIGTYPE (*ifunc)(int);
|
||||
int status;
|
||||
int i, hooked = Qfalse;
|
||||
|
||||
|
@ -1542,7 +1542,7 @@ rb_spawn(int argc, VALUE *argv)
|
|||
earg.argc = argc;
|
||||
earg.argv = argv;
|
||||
earg.prog = prog ? RSTRING(prog)->ptr : 0;
|
||||
status = rb_fork(&status, (int (*)_((void*)))rb_exec, &earg);
|
||||
status = rb_fork(&status, (int (*)(void*))rb_exec, &earg);
|
||||
if (prog && argc) argv[0] = prog;
|
||||
#elif defined HAVE_SPAWNV
|
||||
if (!argc) {
|
||||
|
|
2
ruby.c
2
ruby.c
|
@ -376,7 +376,7 @@ require_libraries(void)
|
|||
int state;
|
||||
|
||||
ruby_current_node = 0;
|
||||
rb_protect((VALUE (*)_((VALUE)))rb_require, (VALUE)list->name, &state);
|
||||
rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
|
||||
if (state) rb_jump_tag(state);
|
||||
tmp = list->next;
|
||||
free(list->name);
|
||||
|
|
2
ruby.h
2
ruby.h
|
@ -394,7 +394,7 @@ struct RData {
|
|||
#define DATA_PTR(dta) (RDATA(dta)->data)
|
||||
|
||||
/*
|
||||
#define RUBY_DATA_FUNC(func) ((void (*)_((void*)))func)
|
||||
#define RUBY_DATA_FUNC(func) ((void (*)(void*))func)
|
||||
*/
|
||||
typedef void (*RUBY_DATA_FUNC)(void*);
|
||||
|
||||
|
|
2
signal.c
2
signal.c
|
@ -321,7 +321,7 @@ rb_gc_mark_trap_list(void)
|
|||
#define sighandler_t sh_t
|
||||
#endif
|
||||
|
||||
typedef RETSIGTYPE (*sighandler_t)_((int));
|
||||
typedef RETSIGTYPE (*sighandler_t)(int);
|
||||
|
||||
#ifdef POSIX_SIGNAL
|
||||
static sighandler_t
|
||||
|
|
Загрузка…
Ссылка в новой задаче