From: nobu.nokada@... Date: 2004-03-31T10:51:35+09:00 Subject: Re: Issue with rb_time_new() Hi, At Wed, 31 Mar 2004 09:03:57 +0900, Daniel Berger wrote in [ruby-core:02724]: > Is this a case of "don't do that"? Should I be casting the value passed > to rb_time_new to ensure an integer value? Or should > time_new_internal() in time.c be altered? Originally, rb_time_new() requires two time_t arguments, but is declared in intern.h without argument declaration to just get rid of including in all sources. However, now there is missing.h, so we could replace such meaningless ANYARGS with proper prototypes. Then, your example will get to fail. Index: intern.h =================================================================== RCS file: /cvs/ruby/src/ruby/intern.h,v retrieving revision 1.142 diff -U2 -p -d -r1.142 intern.h --- intern.h 16 Feb 2004 06:45:31 -0000 1.142 +++ intern.h 31 Mar 2004 01:36:42 -0000 @@ -214,6 +214,6 @@ void rb_thread_interrupt _((void)); void rb_thread_trap_eval _((VALUE, int)); void rb_thread_signal_raise _((char*)); -int rb_thread_select(ANYARGS); -void rb_thread_wait_for(ANYARGS); +int rb_thread_select _((int, fd_set *, fd_set *, fd_set *, struct timeval *)); +void rb_thread_wait_for _((struct timeval time)); VALUE rb_thread_current _((void)); VALUE rb_thread_main _((void)); @@ -445,5 +445,5 @@ VALUE rb_struct_getmember _((VALUE, ID)) VALUE rb_struct_iv_get _((VALUE, char*)); /* time.c */ -VALUE rb_time_new(ANYARGS); +VALUE rb_time_new _((time_t, time_t)); /* variable.c */ VALUE rb_mod_name _((VALUE)); Index: ruby.h =================================================================== RCS file: /cvs/ruby/src/ruby/ruby.h,v retrieving revision 1.102 diff -U2 -p -d -r1.102 ruby.h --- ruby.h 10 Mar 2004 07:05:10 -0000 1.102 +++ ruby.h 31 Mar 2004 01:33:14 -0000 @@ -674,6 +674,6 @@ rb_special_const_p(obj) } -#include "intern.h" #include "missing.h" +#include "intern.h" #if defined(EXTLIB) && defined(USE_DLN_A_OUT) -- Nobu Nakada