summaryrefslogtreecommitdiffstats
path: root/class.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
commit64a641cf2799c88ec11c002fc21badfb47983bf2 (patch)
treeedede8c398b29110d806b1ecce1bcafa3dffb275 /class.c
parent636e2f9bc8d1877db5f0e655bf518dcf7fd4cadc (diff)
downloadruby-64a641cf2799c88ec11c002fc21badfb47983bf2.tar.gz
ruby-64a641cf2799c88ec11c002fc21badfb47983bf2.tar.xz
ruby-64a641cf2799c88ec11c002fc21badfb47983bf2.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@3303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/class.c b/class.c
index a18cdbcc9..50f61655e 100644
--- a/class.c
+++ b/class.c
@@ -54,7 +54,7 @@ clone_method(mid, body, tbl)
NODE *body;
st_table *tbl;
{
- st_insert(tbl, mid, NEW_METHOD(body->nd_body, body->nd_noex));
+ st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
return ST_CONTINUE;
}
@@ -77,7 +77,8 @@ rb_mod_clone(module)
}
if (RCLASS(module)->m_tbl) {
RCLASS(clone)->m_tbl = st_init_numtable();
- st_foreach(RCLASS(module)->m_tbl, clone_method, RCLASS(clone)->m_tbl);
+ st_foreach(RCLASS(module)->m_tbl, clone_method,
+ (st_data_t)RCLASS(clone)->m_tbl);
}
return (VALUE)clone;
@@ -120,7 +121,8 @@ rb_singleton_class_clone(obj)
clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
}
clone->m_tbl = st_init_numtable();
- st_foreach(RCLASS(klass)->m_tbl, clone_method, clone->m_tbl);
+ st_foreach(RCLASS(klass)->m_tbl, clone_method,
+ (st_data_t)clone->m_tbl);
rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
FL_SET(clone, FL_SINGLETON);
return (VALUE)clone;
OSZAR »