diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-03 03:25:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-03 03:25:49 +0000 |
commit | 744ec6294cbe29513af083bf1106b68247c72275 (patch) | |
tree | 8181da9a8b6f8ce3ef0c15f21c25aadf7b970139 | |
parent | 10c98a53b1c513d0c4fde98065df4f866fdc7390 (diff) |
* st.h: fix prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | intern.h | 4 | ||||
-rw-r--r-- | st.h | 41 |
3 files changed, 32 insertions, 17 deletions
@@ -1,3 +1,7 @@ +Fri Dec 3 12:25:41 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * st.h: fix prototypes. + Fri Dec 3 01:55:24 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/lib/tk.rb: widget configuration by TkWindow#method_missing @@ -247,8 +247,8 @@ VALUE rb_gc_enable _((void)); VALUE rb_gc_disable _((void)); VALUE rb_gc_start _((void)); /* hash.c */ -void st_foreach _((struct st_table *, int (*)(), unsigned long)); -void rb_hash_foreach _((VALUE, int (*)(), VALUE)); +void st_foreach_safe _((struct st_table *, int (*)(ANYARGS), unsigned long)); +void rb_hash_foreach _((VALUE, int (*)(ANYARGS), VALUE)); VALUE rb_hash _((VALUE)); VALUE rb_hash_new _((void)); VALUE rb_hash_freeze _((VALUE)); @@ -27,21 +27,32 @@ struct st_table { enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK}; -st_table *st_init_table(struct st_hash_type *); -st_table *st_init_table_with_size(struct st_hash_type *, int); -st_table *st_init_numtable(void); -st_table *st_init_numtable_with_size(int); -st_table *st_init_strtable(void); -st_table *st_init_strtable_with_size(int); -int st_delete(st_table *, st_data_t *, st_data_t *); -int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t); -int st_insert(st_table *, st_data_t, st_data_t); -int st_lookup(st_table *, st_data_t, st_data_t *); -void st_foreach(st_table *, int (*)(), st_data_t); -void st_add_direct(st_table *, st_data_t, st_data_t); -void st_free_table(st_table *); -void st_cleanup_safe(st_table *, st_data_t); -st_table *st_copy(st_table *); +#ifndef _ +# define _(args) args +#endif +#ifndef ANYARGS +# ifdef __cplusplus +# define ANYARGS ... +# else +# define ANYARGS +# endif +#endif + +st_table *st_init_table _((struct st_hash_type *)); +st_table *st_init_table_with_size _((struct st_hash_type *, int)); +st_table *st_init_numtable _((void)); +st_table *st_init_numtable_with_size _((int)); +st_table *st_init_strtable _((void)); +st_table *st_init_strtable_with_size _((int)); +int st_delete _((st_table *, st_data_t *, st_data_t *)); +int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t)); +int st_insert _((st_table *, st_data_t, st_data_t)); +int st_lookup _((st_table *, st_data_t, st_data_t *)); +void st_foreach _((st_table *, int (*)(ANYARGS), st_data_t)); +void st_add_direct _((st_table *, st_data_t, st_data_t)); +void st_free_table _((st_table *)); +void st_cleanup_safe _((st_table *, st_data_t)); +st_table *st_copy _((st_table *)); #define ST_NUMCMP ((int (*)()) 0) #define ST_NUMHASH ((int (*)()) -2) |