mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* class.c, eval.c, hash.c, st.c, variable.c: changed /* ??? */ stuff
protoize generated to ANYARGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									64c8c730d7
								
							
						
					
					
						commit
						e29bce0750
					
				
					 6 changed files with 27 additions and 22 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Thu Oct 20 11:41:57 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>
 | 
			
		||||
 | 
			
		||||
	* class.c, eval.c, hash.c, st.c, variable.c: changed /* ??? */ stuff
 | 
			
		||||
	  protoize generated to ANYARGS.
 | 
			
		||||
 | 
			
		||||
Thu Oct 20 11:18:11 2005  Hirokazu Yamamoto  <ocean@m2.ccsnet.ne.jp>
 | 
			
		||||
 | 
			
		||||
	* eval.c, file.c, ruby.c: removed strchr, strrchr, strstr definition
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								class.c
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								class.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -728,25 +728,25 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_method_id(VALUE klass, ID name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_method_id(VALUE klass, ID name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_method(VALUE klass, const char *name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_protected_method(VALUE klass, const char *name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_private_method(VALUE klass, const char *name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -799,20 +799,20 @@ rb_singleton_class(VALUE obj)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_define_method(rb_singleton_class(obj), name, func, argc);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_module_function(VALUE module, const char *name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_define_private_method(module, name, func, argc);
 | 
			
		||||
    rb_define_singleton_method(module, name, func, argc);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_define_global_function(const char *name, VALUE (*func) (/* ??? */), int argc)
 | 
			
		||||
rb_define_global_function(const char *name, VALUE (*func)(ANYARGS), int argc)
 | 
			
		||||
{
 | 
			
		||||
    rb_define_module_function(rb_mKernel, name, func, argc);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										16
									
								
								eval.c
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								eval.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -5098,7 +5098,7 @@ assign(VALUE self, NODE *lhs, VALUE val, int pcall)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_iterate(VALUE (*it_proc) (VALUE), VALUE data1, VALUE (*bl_proc) (/* ??? */), VALUE data2)
 | 
			
		||||
rb_iterate(VALUE (*it_proc)(VALUE), VALUE data1, VALUE (*bl_proc)(ANYARGS), VALUE data2)
 | 
			
		||||
{
 | 
			
		||||
    int state;
 | 
			
		||||
    volatile VALUE retval = Qnil;
 | 
			
		||||
| 
						 | 
				
			
			@ -5208,7 +5208,7 @@ rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALU
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_rescue(VALUE (*b_proc) (/* ??? */), VALUE data1, VALUE (*r_proc) (/* ??? */), VALUE data2)
 | 
			
		||||
rb_rescue(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2)
 | 
			
		||||
{
 | 
			
		||||
    return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -5242,7 +5242,7 @@ rb_protect(VALUE (*proc) (VALUE), VALUE data, int *state)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_ensure(VALUE (*b_proc) (/* ??? */), VALUE data1, VALUE (*e_proc) (/* ??? */), VALUE data2)
 | 
			
		||||
rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE data2)
 | 
			
		||||
{
 | 
			
		||||
    int state;
 | 
			
		||||
    volatile VALUE result = Qnil;
 | 
			
		||||
| 
						 | 
				
			
			@ -5261,7 +5261,7 @@ rb_ensure(VALUE (*b_proc) (/* ??? */), VALUE data1, VALUE (*e_proc) (/* ??? */),
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_with_disable_interrupt(VALUE (*proc) (/* ??? */), VALUE data)
 | 
			
		||||
rb_with_disable_interrupt(VALUE (*proc)(ANYARGS), VALUE data)
 | 
			
		||||
{
 | 
			
		||||
    VALUE result = Qnil;	/* OK */
 | 
			
		||||
    int status;
 | 
			
		||||
| 
						 | 
				
			
			@ -5415,7 +5415,7 @@ method_missing(VALUE obj, ID id, int argc, const VALUE *argv, int call_status)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
static inline VALUE
 | 
			
		||||
call_cfunc(VALUE (*func) (/* ??? */), VALUE recv, int len, int argc, const VALUE *argv)
 | 
			
		||||
call_cfunc(VALUE (*func)(ANYARGS), VALUE recv, int len, int argc, const VALUE *argv)
 | 
			
		||||
{
 | 
			
		||||
    if (len >= 0 && argc != len) {
 | 
			
		||||
	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
 | 
			
		||||
| 
						 | 
				
			
			@ -11566,7 +11566,7 @@ thread_insert(rb_thread_t th)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
rb_thread_start_0(VALUE (*fn) (/* ??? */), VALUE arg, rb_thread_t th)
 | 
			
		||||
rb_thread_start_0(VALUE (*fn)(ANYARGS), VALUE arg, rb_thread_t th)
 | 
			
		||||
{
 | 
			
		||||
    volatile rb_thread_t th_save = th;
 | 
			
		||||
    volatile VALUE thread = th->thread;
 | 
			
		||||
| 
						 | 
				
			
			@ -11732,7 +11732,7 @@ rb_thread_start_1(void)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_thread_create(VALUE (*fn) (/* ??? */), void *arg)
 | 
			
		||||
rb_thread_create(VALUE (*fn)(ANYARGS), void *arg)
 | 
			
		||||
{
 | 
			
		||||
    Init_stack((VALUE*)&arg);
 | 
			
		||||
    return rb_thread_start_0(fn, (VALUE)arg, rb_thread_alloc(rb_cThread));
 | 
			
		||||
| 
						 | 
				
			
			@ -12826,7 +12826,7 @@ catch_i(VALUE tag)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
VALUE
 | 
			
		||||
rb_catch(const char *tag, VALUE (*func) (/* ??? */), VALUE data)
 | 
			
		||||
rb_catch(const char *tag, VALUE (*func)(ANYARGS), VALUE data)
 | 
			
		||||
{
 | 
			
		||||
    return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								hash.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								hash.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -119,7 +119,7 @@ foreach_safe_i(st_data_t key, st_data_t value, struct foreach_safe_arg *arg)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
st_foreach_safe(st_table *table, int (*func) (/* ??? */), st_data_t a)
 | 
			
		||||
st_foreach_safe(st_table *table, int (*func)(ANYARGS), st_data_t a)
 | 
			
		||||
{
 | 
			
		||||
    struct foreach_safe_arg arg;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -185,7 +185,7 @@ hash_foreach_call(struct hash_foreach_arg *arg)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
rb_hash_foreach(VALUE hash, int (*func) (/* ??? */), VALUE farg)
 | 
			
		||||
rb_hash_foreach(VALUE hash, int (*func)(ANYARGS), VALUE farg)
 | 
			
		||||
{
 | 
			
		||||
    struct hash_foreach_arg arg;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								st.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								st.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -458,7 +458,7 @@ st_cleanup_safe(st_table *table, st_data_t never)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
st_foreach(st_table *table, int (*func) (/* ??? */), st_data_t arg)
 | 
			
		||||
st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
 | 
			
		||||
{
 | 
			
		||||
    st_table_entry *ptr, *last, *tmp;
 | 
			
		||||
    enum st_retval retval;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -446,8 +446,8 @@ void
 | 
			
		|||
rb_define_hooked_variable(
 | 
			
		||||
    const char *name,
 | 
			
		||||
    VALUE *var,
 | 
			
		||||
    VALUE (*getter) (/* ??? */),
 | 
			
		||||
    void  (*setter) (/* ??? */))
 | 
			
		||||
    VALUE (*getter)(ANYARGS),
 | 
			
		||||
    void  (*setter)(ANYARGS))
 | 
			
		||||
{
 | 
			
		||||
    struct global_variable *gvar;
 | 
			
		||||
    ID id = global_id(name);
 | 
			
		||||
| 
						 | 
				
			
			@ -474,8 +474,8 @@ rb_define_readonly_variable(const char *name, VALUE *var)
 | 
			
		|||
void
 | 
			
		||||
rb_define_virtual_variable(
 | 
			
		||||
    const char *name,
 | 
			
		||||
    VALUE (*getter) (/* ??? */),
 | 
			
		||||
    void  (*setter) (/* ??? */))
 | 
			
		||||
    VALUE (*getter)(ANYARGS),
 | 
			
		||||
    void  (*setter)(ANYARGS))
 | 
			
		||||
{
 | 
			
		||||
    if (!getter) getter = val_getter;
 | 
			
		||||
    if (!setter) setter = readonly_setter;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue