comparison qt/d1/qt/qtd/Str.d @ 248:7664de4a55e5

Fixed #23. QtD_QObjectEntity is not created dynamically for shell classes any more. Class initialization is now performed by static constructors. When wrapping QObjects returned from functions, their run-time types are now taken into account. QObjects are allocated on GC heap, a doubly-linked list is used to prevent them from been collected (arguably a better solution than allocating on C heap and adding GC ranges) Minor changes (including unnecessary).
author maxter
date Thu, 20 Aug 2009 14:47:17 +0000
parents 27497bbe62a1
children 37eed70de029
comparison
equal deleted inserted replaced
247:27497bbe62a1 248:7664de4a55e5
9 * 9 *
10 */ 10 */
11 11
12 module qt.qtd.Str; 12 module qt.qtd.Str;
13 13
14 import tango.text.convert.Utf : toString; 14 import tango.text.convert.Utf : toString;
15 public import tango.stdc.stringz : fromStringz; 15 public import tango.stdc.stringz : fromStringz;
16 16
17 alias char[] string; 17 alias char[] string;
18 alias wchar[] wstring; 18 alias wchar[] wstring;
19 19
20 alias char* stringz; 20 alias char* stringz;
21 alias char* cstringz; 21 alias char* cstringz;
22 22
23 public static char** toStringzArray(char[][] args) 23 public static char** toStringzArray(char[][] args)
34 } 34 }
35 argv[argc] = null; 35 argv[argc] = null;
36 36
37 return argv; 37 return argv;
38 } 38 }
39 39 extern(C) void qtd_toUtf8(wchar* arr, uint size, string* str){
40 version(Windows) 40 *str = toString(arr[0..size]);
41 {
42 export extern(C) void _d_toUtf8(wchar* arr, uint size, string* str)
43 {
44 *str = toString(arr[0..size]);
45 }
46 }
47 else
48 {
49 extern(C) void _d_toUtf8(wchar* arr, uint size, string* str)
50 {
51 *str = toString(arr[0..size]);
52 }
53 } 41 }
54 42
55 43