From 91b9d37a853d4b8629c2719328ba6473d8766959 Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 6 Jan 2003 15:55:43 +0000 Subject: * 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 --- gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gc.c') 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; { -- cgit v1.2.3