From ca32aea6a24d443434f1fa40b9091edc16ef03bf Mon Sep 17 00:00:00 2001 From: ocean Date: Wed, 14 Sep 2005 08:30:16 +0000 Subject: * 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 --- ChangeLog | 7 +++++++ dir.c | 6 +++--- enumerator.c | 2 +- eval.c | 12 ++++++------ gc.c | 4 ++-- intern.h | 2 +- io.c | 4 ++-- process.c | 10 +++++----- ruby.c | 2 +- ruby.h | 2 +- signal.c | 2 +- 11 files changed, 30 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5417f1b00f..591df63b50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Sep 14 17:24:22 2005 Hirokazu Yamamoto + + * 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 * bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056] diff --git a/dir.c b/dir.c index d9c77dceb7..9f425cc933 100644 --- a/dir.c +++ b/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; } diff --git a/enumerator.c b/enumerator.c index 92fec6420b..e47bfb55be 100644 --- a/enumerator.c +++ b/enumerator.c @@ -48,7 +48,7 @@ struct enumerator { VALUE method; VALUE proc; VALUE args; - VALUE (*iter)_((VALUE, struct enumerator *)); + VALUE (*iter)(VALUE, struct enumerator *); }; static void diff --git a/eval.c b/eval.c index 2758cb8d30..43bed97690 100644 --- a/eval.c +++ b/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); } /* diff --git a/gc.c b/gc.c index aaa53c98bc..c9b670435e 100644 --- a/gc.c +++ b/gc.c @@ -1723,7 +1723,7 @@ run_final(VALUE obj) for (i=0; ilen; 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; ilen; 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; diff --git a/intern.h b/intern.h index 4ae5040d09..15f0f6a1f9 100644 --- a/intern.h +++ b/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); diff --git a/io.c b/io.c index eae3ce0d33..3f666933cc 100644 --- a/io.c +++ b/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 diff --git a/process.c b/process.c index 9052b9f10b..ade0acc6f5 100644 --- a/process.c +++ b/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) { diff --git a/ruby.c b/ruby.c index 281110c5b3..42f8cb3fc9 100644 --- a/ruby.c +++ b/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); diff --git a/ruby.h b/ruby.h index 1ad94a60c1..5b5e2db716 100644 --- a/ruby.h +++ b/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*); diff --git a/signal.c b/signal.c index ea0504b47b..dd79b861ac 100644 --- a/signal.c +++ b/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 -- cgit v1.2.3