summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-06 15:55:43 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-06 15:55:43 +0000
commit91b9d37a853d4b8629c2719328ba6473d8766959 (patch)
treeedede8c398b29110d806b1ecce1bcafa3dffb275 /gc.c
parent8eba0580798736ee144793e24afdb31d4ddb1cb5 (diff)
* st.h, st.c: Introduce new conventional typedef's, st_data_t,
st_compare_func_t, st_hash_func_t and st_each_func_t. * st.h, st.c: Do explicit function declarations and do not rely on implicit declarations. On such platforms as IA64, int argument values are NOT automatically promoted to long (64bit) values, so explicit declarations are mandatory for those functions that take long values or pointers. This fixes miniruby's coredump on FreeBSD/IA64. * class.c, eval.c, gc.c, hash.c, marshal.c, parse.y, variable.c: Add proper casts to avoid warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index e47d943d4e..c86d2485a5 100644
--- a/gc.c
+++ b/gc.c
@@ -428,12 +428,12 @@ rb_source_filename(f)
{
char *name;
- if (!st_lookup(source_filenames, f, &name)) {
+ if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) {
long len = strlen(f) + 1;
char *ptr = name = ALLOC_N(char, len + 1);
*ptr++ = 0;
MEMCPY(ptr, f, char, len);
- st_add_direct(source_filenames, ptr, name);
+ st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name);
return ptr;
}
return name + 1;
@@ -448,7 +448,7 @@ mark_source_filename(f)
}
}
-static enum st_retval
+static int
sweep_source_filename(key, value)
char *key, *value;
{