Mercurial > projects > ldc
comparison lphobos/internal/objectimpl.d @ 126:a2c2c3c1a73d trunk
[svn r130] fixed #28
author | lindquist |
---|---|
date | Wed, 28 Nov 2007 05:04:38 +0100 |
parents | fd7ad91fd713 |
children | 373489eeaf90 |
comparison
equal
deleted
inserted
replaced
125:c42d245468ea | 126:a2c2c3c1a73d |
---|---|
108 /** | 108 /** |
109 * Convert Object to a human readable string. | 109 * Convert Object to a human readable string. |
110 */ | 110 */ |
111 char[] toString() | 111 char[] toString() |
112 { | 112 { |
113 //return this.classinfo.name; | 113 return this.classinfo.name; |
114 return "object.Object (no classinfo yet)"; | |
115 } | 114 } |
116 | 115 |
117 /** | 116 /** |
118 * Compute hash function for Object. | 117 * Compute hash function for Object. |
119 */ | 118 */ |
135 int opCmp(Object o) | 134 int opCmp(Object o) |
136 { | 135 { |
137 // BUG: this prevents a compacting GC from working, needs to be fixed | 136 // BUG: this prevents a compacting GC from working, needs to be fixed |
138 //return cast(int)cast(void *)this - cast(int)cast(void *)o; | 137 //return cast(int)cast(void *)this - cast(int)cast(void *)o; |
139 | 138 |
140 //throw new Error("need opCmp for class " ~ this.classinfo.name); | 139 throw new Error("need opCmp for class " ~ this.classinfo.name); |
141 throw new Error("need opCmp for class unknown object.Object (no classinfo yet)"); | |
142 } | 140 } |
143 | 141 |
144 /** | 142 /** |
145 * Returns !=0 if this object does have the same contents as obj. | 143 * Returns !=0 if this object does have the same contents as obj. |
146 */ | 144 */ |