Mercurial > projects > dwt-linux
comparison dwt/internal/cairo/Cairo.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 |
comparison
equal
deleted
inserted
replaced
320:f516317c1e89 | 321:ffb904674b52 |
---|---|
61 } | 61 } |
62 | 62 |
63 template NameOfFunc(alias f) { | 63 template NameOfFunc(alias f) { |
64 // Note: highly dependent on the .stringof formatting | 64 // Note: highly dependent on the .stringof formatting |
65 // the value begins with "& " which is why the first two chars are cut off | 65 // the value begins with "& " which is why the first two chars are cut off |
66 const String NameOfFunc = (&f).stringof[2 .. $]; | 66 version( LLVMDC ){ |
67 // stringof in LLVMDC is "&foobar" | |
68 const char[] NameOfFunc = (&f).stringof[1 .. $]; | |
69 } | |
70 else{ | |
71 // stringof in DMD is "& foobar" | |
72 const char[] NameOfFunc = (&f).stringof[2 .. $]; | |
73 } | |
67 } | 74 } |
68 | 75 |
69 template ForwardGtkCairoCFunc( alias cFunc ) { | 76 template ForwardGtkCairoCFunc( alias cFunc ) { |
70 alias ParameterTupleOf!(cFunc) P; | 77 alias ParameterTupleOf!(cFunc) P; |
71 alias ReturnTypeOf!(cFunc) R; | 78 alias ReturnTypeOf!(cFunc) R; |