summaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-09 04:28:28 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-09 04:28:28 +0000
commite29b4b4862f4e3a6a727c407a711939f74124941 (patch)
treecdeb1de9e4fd0eaef632e596afee4c3bf164f4a2 /st.h
parentc65638ce2944e020eac4e80eb760486001e47945 (diff)
downloadruby-e29b4b4862f4e3a6a727c407a711939f74124941.tar.gz
* st.h, st.c: Back out the introduction of st_*_func_t. Some
compilers complain about function type mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.h')
-rw-r--r--st.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/st.h b/st.h
index 223f4f66e7..888ca50e4f 100644
--- a/st.h
+++ b/st.h
@@ -8,15 +8,11 @@
typedef long st_data_t;
-typedef int (*st_compare_func_t)(st_data_t data1, st_data_t data2);
-typedef int (*st_hash_func_t)(st_data_t data);
-typedef int (*st_each_func_t)(st_data_t key, st_data_t value, st_data_t data);
-
typedef struct st_table st_table;
struct st_hash_type {
- st_compare_func_t compare;
- st_hash_func_t hash;
+ int (*compare)();
+ int (*hash)();
};
struct st_table {
@@ -40,14 +36,14 @@ 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 *, st_each_func_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 *);
-#define ST_NUMCMP ((st_compare_func_t) 0)
-#define ST_NUMHASH ((st_hash_func_t) -2)
+#define ST_NUMCMP ((int (*)()) 0)
+#define ST_NUMHASH ((int (*)()) -2)
#define st_numcmp ST_NUMCMP
#define st_numhash ST_NUMHASH