Mercurial > projects > ldc
view lphobos/typeinfo1/ti_short.d @ 841:783f67fbdf4a
Removed insufficient fix for DMD bug 1161, it was causing problems with instantiating imported templates, and passing private variables as aliases. I failed to come up with a proper fix!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 10 Dec 2008 13:56:10 +0100 |
parents | 2c3cd3596187 |
children |
line wrap: on
line source
// short module typeinfo1.ti_short; class TypeInfo_s : TypeInfo { char[] toString() { return "short"; } hash_t getHash(void *p) { return *cast(short *)p; } int equals(void *p1, void *p2) { return *cast(short *)p1 == *cast(short *)p2; } int compare(void *p1, void *p2) { return *cast(short *)p1 - *cast(short *)p2; } size_t tsize() { return short.sizeof; } void swap(void *p1, void *p2) { short t; t = *cast(short *)p1; *cast(short *)p1 = *cast(short *)p2; *cast(short *)p2 = t; } }