summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h4
-rw-r--r--include/ruby/st.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 9ebf5d6c5e..3adec625da 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -633,12 +633,12 @@ VALUE rb_str_cat(VALUE, const char*, long);
VALUE rb_str_cat2(VALUE, const char*);
VALUE rb_str_append(VALUE, VALUE);
VALUE rb_str_concat(VALUE, VALUE);
-int rb_memhash(const void *ptr, long len);
+st_index_t rb_memhash(const void *ptr, long len);
VALUE rb_hash_start(VALUE);
VALUE rb_hash_uint32(VALUE, unsigned int);
VALUE rb_hash_uint(VALUE, VALUE);
VALUE rb_hash_end(VALUE);
-int rb_str_hash(VALUE);
+st_index_t rb_str_hash(VALUE);
int rb_str_hash_cmp(VALUE,VALUE);
int rb_str_comparable(VALUE, VALUE);
int rb_str_cmp(VALUE, VALUE);
diff --git a/include/ruby/st.h b/include/ruby/st.h
index aebdaf569d..a63364cb45 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -55,15 +55,15 @@ typedef unsigned LONG_LONG st_data_t;
typedef struct st_table st_table;
+typedef st_data_t st_index_t;
typedef int st_compare_func(st_data_t, st_data_t);
-typedef int st_hash_func(st_data_t);
+typedef st_index_t st_hash_func(st_data_t);
struct st_hash_type {
int (*compare)(ANYARGS /*st_data_t, st_data_t*/); /* st_compare_func* */
- int (*hash)(ANYARGS /*st_data_t*/); /* st_hash_func* */
+ st_index_t (*hash)(ANYARGS /*st_data_t*/); /* st_hash_func* */
};
-typedef st_data_t st_index_t;
#define ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT)
struct st_table {
@@ -104,7 +104,7 @@ void st_cleanup_safe(st_table *, st_data_t);
void st_clear(st_table *);
st_table *st_copy(st_table *);
int st_numcmp(st_data_t, st_data_t);
-int st_numhash(st_data_t);
+st_index_t st_numhash(st_data_t);
int st_strcasecmp(const char *s1, const char *s2);
int st_strncasecmp(const char *s1, const char *s2, size_t n);
size_t st_memsize(st_table *);