summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-01-18 06:09:05 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-01-18 06:09:05 +0000
commite5ed1780afa9a5f29da7c63ca2b7d9c66f6936aa (patch)
tree02bb807e93fa0b9e53167165439d507c432b199b /struct.c
parentdde62bcd2efbb3825d982326896ab774e73e4218 (diff)
2000-01-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/struct.c b/struct.c
index 790e185b63..145c2e5b44 100644
--- a/struct.c
+++ b/struct.c
@@ -524,38 +524,6 @@ rb_struct_equal(s, s2)
}
static VALUE
-rb_struct_eql(s, s2)
- VALUE s, s2;
-{
- long i;
-
- if (TYPE(s2) != T_STRUCT) return Qfalse;
- if (CLASS_OF(s) != CLASS_OF(s2)) return Qfalse;
- if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
- rb_bug("inconsistent struct"); /* should never happen */
- }
-
- for (i=0; i<RSTRUCT(s)->len; i++) {
- if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
- }
- return Qtrue;
-}
-
-static VALUE
-rb_struct_hash(s)
- VALUE s;
-{
- long i;
- int h;
-
- h = CLASS_OF(s);
- for (i=0; i<RSTRUCT(s)->len; i++) {
- h ^= rb_hash(RSTRUCT(s)->ptr[i]);
- }
- return INT2FIX(h);
-}
-
-static VALUE
rb_struct_size(s)
VALUE s;
{
@@ -574,8 +542,6 @@ Init_Struct()
rb_define_method(rb_cStruct, "clone", rb_struct_clone, 0);
rb_define_method(rb_cStruct, "==", rb_struct_equal, 1);
- rb_define_method(rb_cStruct, "eql?", rb_struct_eql, 1);
- rb_define_method(rb_cStruct, "hash", rb_struct_hash, 0);
rb_define_method(rb_cStruct, "to_s", rb_struct_to_s, 0);
rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0);