Mercurial > projects > qtd
diff d2/qtd/String.d @ 357:9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Q_CLASSINFO implementation
Now Qtd can be built on Windows
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Wed, 02 Jun 2010 19:38:05 +0300 |
parents | 12cec2d14e1c |
children | da4235301224 |
line wrap: on
line diff
--- a/d2/qtd/String.d Tue May 25 20:14:04 2010 +0300 +++ b/d2/qtd/String.d Wed Jun 02 19:38:05 2010 +0300 @@ -11,7 +11,9 @@ module qtd.String; -import core.stdc.string; +import + core.stdc.string, + qtd.Core; import std.utf : toUTF8; alias immutable(char)* stringz; @@ -67,10 +69,11 @@ return s ? s[0 .. strlen(s)].idup : cast(string)null; } -extern(C) void qtd_toUtf8(wchar* arr, uint size, string* str) -{ - *str = toUTF8(arr[0..size]); -} +mixin(qtdExport("void", "toUtf8", "wchar* arr, uint size, string* str", + q{ + *str = toUTF8(arr[0..size]); + })); +