Mercurial > projects > ldc
view lphobos/typeinfo1/ti_wchar.d @ 1451:297d1e2f6441
Add `syscall` to the x86-64 asm parser, and both `syscall` and `sysret` to the
x86 one. Fixes #316.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 01 Jun 2009 23:42:42 +0200 |
parents | 2c3cd3596187 |
children |
line wrap: on
line source
module typeinfo1.ti_wchar; class TypeInfo_u : TypeInfo { char[] toString() { return "wchar"; } hash_t getHash(void *p) { return *cast(wchar *)p; } int equals(void *p1, void *p2) { return *cast(wchar *)p1 == *cast(wchar *)p2; } int compare(void *p1, void *p2) { return *cast(wchar *)p1 - *cast(wchar *)p2; } size_t tsize() { return wchar.sizeof; } void swap(void *p1, void *p2) { wchar t; t = *cast(wchar *)p1; *cast(wchar *)p1 = *cast(wchar *)p2; *cast(wchar *)p2 = t; } void[] init() { static wchar c; return (cast(wchar *)&c)[0 .. 1]; } }