* 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:
ocean 2005-09-14 08:30:16 +00:00
parent 6c32e232d9
commit ca32aea6a2
11 changed files with 30 additions and 23 deletions

View File

@ -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> 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] * bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]

6
dir.c
View File

@ -896,7 +896,7 @@ do_stat(const char *path, struct stat *pst)
{ {
int ret = stat(path, pst); int ret = stat(path, pst);
if (ret < 0 && errno != ENOENT) 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; return ret;
} }
@ -906,7 +906,7 @@ do_lstat(const char *path, struct stat *pst)
{ {
int ret = lstat(path, pst); int ret = lstat(path, pst);
if (ret < 0 && errno != ENOENT) 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; return ret;
} }
@ -916,7 +916,7 @@ do_opendir(const char *path)
{ {
DIR *dirp = opendir(path); DIR *dirp = opendir(path);
if (dirp == NULL && errno != ENOENT && errno != ENOTDIR) 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; return dirp;
} }

View File

@ -48,7 +48,7 @@ struct enumerator {
VALUE method; VALUE method;
VALUE proc; VALUE proc;
VALUE args; VALUE args;
VALUE (*iter)_((VALUE, struct enumerator *)); VALUE (*iter)(VALUE, struct enumerator *);
}; };
static void static void

12
eval.c
View File

@ -1589,7 +1589,7 @@ rb_eval_string(const char *str)
VALUE VALUE
rb_eval_string_protect(const char *str, int *state) 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 VALUE
@ -8540,7 +8540,7 @@ block_pass(VALUE self, NODE *node)
struct block_arg arg; struct block_arg arg;
arg.self = self; arg.self = self;
arg.iter = node->nd_iter; 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)); (VALUE)&arg, rb_eval(self, node->nd_body));
} }
@ -9124,7 +9124,7 @@ rb_proc_new(
VALUE val) VALUE val)
{ {
struct BLOCK *data; 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_Get_Struct(proc, struct BLOCK, data);
data->body->nd_state = YIELD_FUNC_AVALUE; data->body->nd_state = YIELD_FUNC_AVALUE;
@ -9149,7 +9149,7 @@ method_proc(VALUE method)
if (nd_type(mdata->body) == NODE_BMETHOD) { if (nd_type(mdata->body) == NODE_BMETHOD) {
return mdata->body->nd_cval; 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); Data_Get_Struct(proc, struct BLOCK, bdata);
bdata->body->nd_file = mdata->body->nd_file; bdata->body->nd_file = mdata->body->nd_file;
nd_set_line(bdata->body, nd_line(mdata->body)); nd_set_line(bdata->body, nd_line(mdata->body));
@ -10445,7 +10445,7 @@ rb_thread_schedule(void)
if (rb_trap_pending) { if (rb_trap_pending) {
int status; int status;
rb_protect((VALUE (*)_((VALUE)))rb_trap_exec, Qnil, &status); rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
if (status) { if (status) {
rb_fd_term(&readfds); rb_fd_term(&readfds);
rb_fd_term(&writefds); rb_fd_term(&writefds);
@ -12825,7 +12825,7 @@ catch_i(VALUE tag)
VALUE VALUE
rb_catch(const char *tag, VALUE (*func) (/* ??? */), VALUE data) 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
View File

@ -1723,7 +1723,7 @@ run_final(VALUE obj)
for (i=0; i<RARRAY(finalizers)->len; i++) { for (i=0; i<RARRAY(finalizers)->len; i++) {
args[0] = RARRAY(finalizers)->ptr[i]; args[0] = RARRAY(finalizers)->ptr[i];
if (!args[1]) args[1] = rb_ary_new3(1, objid); 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)) { if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
for (i=0; i<RARRAY(table)->len; i++) { for (i=0; i<RARRAY(table)->len; i++) {
@ -1731,7 +1731,7 @@ run_final(VALUE obj)
args[0] = RARRAY(final)->ptr[1]; args[0] = RARRAY(final)->ptr[1];
if (!args[1]) args[1] = rb_ary_new3(1, objid); if (!args[1]) args[1] = rb_ary_new3(1, objid);
args[2] = FIX2INT(RARRAY(final)->ptr[0]); 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; rb_thread_critical = critical_save;

View File

@ -413,7 +413,7 @@ int rb_proc_exec_n(int, VALUE*, const char*);
int rb_proc_exec(const char*); int rb_proc_exec(const char*);
VALUE rb_check_argv(int, VALUE*); VALUE rb_check_argv(int, VALUE*);
int rb_exec(const struct rb_exec_arg*); 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*); VALUE rb_f_exec(int,VALUE*);
int rb_waitpid(int,int*,int); int rb_waitpid(int,int*,int);
void rb_syswait(int); void rb_syswait(int);

4
io.c
View File

@ -459,7 +459,7 @@ rb_io_wait_readable(int f)
rb_fd_set(f, &rfds); rb_fd_set(f, &rfds);
#ifdef HAVE_RB_FD_INIT #ifdef HAVE_RB_FD_INIT
rb_ensure(wait_readable, (VALUE)&rfds, rb_ensure(wait_readable, (VALUE)&rfds,
(VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&rfds); (VALUE (*)(VALUE))rb_fd_term, (VALUE)&rfds);
#else #else
rb_thread_select(f + 1, &rfds, NULL, NULL, NULL); rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
#endif #endif
@ -502,7 +502,7 @@ rb_io_wait_writable(int f)
rb_fd_set(f, &wfds); rb_fd_set(f, &wfds);
#ifdef HAVE_RB_FD_INIT #ifdef HAVE_RB_FD_INIT
rb_ensure(wait_writable, (VALUE)&wfds, rb_ensure(wait_writable, (VALUE)&wfds,
(VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&wfds); (VALUE (*)(VALUE))rb_fd_term, (VALUE)&wfds);
#else #else
rb_thread_select(f + 1, NULL, &wfds, NULL, NULL); rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
#endif #endif

View File

@ -1263,7 +1263,7 @@ rb_exec(const struct rb_exec_arg *e)
#ifdef HAVE_FORK #ifdef HAVE_FORK
#ifdef FD_CLOEXEC #ifdef FD_CLOEXEC
#if SIZEOF_INT == SIZEOF_LONG #if SIZEOF_INT == SIZEOF_LONG
#define proc_syswait (VALUE (*)_((VALUE)))rb_syswait #define proc_syswait (VALUE (*)(VALUE))rb_syswait
#else #else
static VALUE static VALUE
proc_syswait(pid) proc_syswait(pid)
@ -1486,12 +1486,12 @@ rb_syswait(int pid)
{ {
static int overriding; static int overriding;
#ifdef SIGHUP #ifdef SIGHUP
RETSIGTYPE (*hfunc)_((int)); RETSIGTYPE (*hfunc)(int);
#endif #endif
#ifdef SIGQUIT #ifdef SIGQUIT
RETSIGTYPE (*qfunc)_((int)); RETSIGTYPE (*qfunc)(int);
#endif #endif
RETSIGTYPE (*ifunc)_((int)); RETSIGTYPE (*ifunc)(int);
int status; int status;
int i, hooked = Qfalse; int i, hooked = Qfalse;
@ -1542,7 +1542,7 @@ rb_spawn(int argc, VALUE *argv)
earg.argc = argc; earg.argc = argc;
earg.argv = argv; earg.argv = argv;
earg.prog = prog ? RSTRING(prog)->ptr : 0; 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; if (prog && argc) argv[0] = prog;
#elif defined HAVE_SPAWNV #elif defined HAVE_SPAWNV
if (!argc) { if (!argc) {

2
ruby.c
View File

@ -376,7 +376,7 @@ require_libraries(void)
int state; int state;
ruby_current_node = 0; 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); if (state) rb_jump_tag(state);
tmp = list->next; tmp = list->next;
free(list->name); free(list->name);

2
ruby.h
View File

@ -394,7 +394,7 @@ struct RData {
#define DATA_PTR(dta) (RDATA(dta)->data) #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*); typedef void (*RUBY_DATA_FUNC)(void*);

View File

@ -321,7 +321,7 @@ rb_gc_mark_trap_list(void)
#define sighandler_t sh_t #define sighandler_t sh_t
#endif #endif
typedef RETSIGTYPE (*sighandler_t)_((int)); typedef RETSIGTYPE (*sighandler_t)(int);
#ifdef POSIX_SIGNAL #ifdef POSIX_SIGNAL
static sighandler_t static sighandler_t