Mercurial > projects > dwt-linux
diff dwt/internal/accessibility/gtk/ATK.d @ 321:ffb904674b52
Fixes for LLVMDC
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 27 Sep 2008 15:58:22 +0200 |
parents | 380bad9f6852 |
children | 174bd206cf10 |
line wrap: on
line diff
--- a/dwt/internal/accessibility/gtk/ATK.d Fri Sep 19 22:29:59 2008 +0200 +++ b/dwt/internal/accessibility/gtk/ATK.d Sat Sep 27 15:58:22 2008 +0200 @@ -60,12 +60,17 @@ } - - template NameOfFunc(alias f) { // Note: highly dependent on the .stringof formatting // the value begins with "& " which is why the first two chars are cut off - const String NameOfFunc = (&f).stringof[2 .. $]; + version( LLVMDC ){ + // stringof in LLVMDC is "&foobar" + const char[] NameOfFunc = (&f).stringof[1 .. $]; + } + else{ + // stringof in DMD is "& foobar" + const char[] NameOfFunc = (&f).stringof[2 .. $]; + } } template ForwardGtkAtkCFunc( alias cFunc ) {