Mercurial > projects > dwt-linux
diff dwt/dwthelper/System.d @ 219:9b4e6fc63930
utils updates
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Apr 2008 22:26:22 +0200 |
parents | de2578a843a7 |
children | 380bad9f6852 |
line wrap: on
line diff
--- a/dwt/dwthelper/System.d Sun Apr 06 22:25:15 2008 +0200 +++ b/dwt/dwthelper/System.d Sun Apr 06 22:26:22 2008 +0200 @@ -128,6 +128,18 @@ static void exit( int code ){ .exit(code); } + public static int identityHashCode(Object x){ + if( x is null ){ + return 0; + } + return (*cast(Object *)&x).toHash(); + } + public static char[] getProperty( char[] key ){ + switch( key ){ + case "os.name": return "linux"; + default: return null; + } + } }