Mercurial > projects > dwt-mac
comparison dwt/internal/C.d @ 36:db5a898b2119
Fixed a lot of compile errors
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 07 Oct 2008 12:56:18 +0200 |
parents | f565d3a95c0a |
children | d8635bb48c7c |
comparison
equal
deleted
inserted
replaced
35:7d135fe0caf2 | 36:db5a898b2119 |
---|---|
11 * Port to the D programming language: | 11 * Port to the D programming language: |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <jacob.carlborg@gmail.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.C; | 14 module dwt.internal.C; |
15 | 15 |
16 import stdc = tango.stdc.stdlib : free, malloc, getenv; | 16 static import stdlib = tango.stdc.stdlib; |
17 import stdc = tango.stdc.string : memmove, memset, strlen; | 17 static import stdcstring = tango.stdc.string; |
18 | 18 |
19 import dwt.internal.Library; | 19 import dwt.internal.Library; |
20 import dwt.internal.Platform; | 20 import dwt.internal.Platform; |
21 | 21 |
22 public class C : Platform { | 22 public class C : Platform { |
30 Library.loadLibrary ("swt"); //$NON-NLS-1$ | 30 Library.loadLibrary ("swt"); //$NON-NLS-1$ |
31 }*/ | 31 }*/ |
32 | 32 |
33 public static const size_t PTR_SIZEOF = (void*).sizeof; | 33 public static const size_t PTR_SIZEOF = (void*).sizeof; |
34 | 34 |
35 alias stdc.free free; | 35 alias stdlib.free free; |
36 alias stdc.getenv getenv; | 36 alias stdlib.getenv getenv; |
37 alias stdc.malloc malloc; | 37 alias stdlib.malloc malloc; |
38 alias stdc.memset memset; | 38 alias stdcstring.memset memset; |
39 alias stdc.memmove memmove; | 39 alias stdcstring.memmove memmove; |
40 alias stdc.strlen strlen; | 40 alias stdcstring.strlen strlen; |
41 | 41 |
42 /+public static final native void free (int /*long*/ ptr); | 42 /+public static final native void free (int /*long*/ ptr); |
43 public static final native int /*long*/ getenv (byte[] wcsToMbcs); | 43 public static final native int /*long*/ getenv (byte[] wcsToMbcs); |
44 public static final native int /*long*/ malloc (int /*long*/ size); | 44 public static final native int /*long*/ malloc (int /*long*/ size); |
45 public static final native void memmove (int /*long*/ dest, byte[] src, int /*long*/ size); | 45 public static final native void memmove (int /*long*/ dest, byte[] src, int /*long*/ size); |