diff dwt/internal/Library.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 3afcd4ddcf90
children 36f5cb12e1a2
line wrap: on
line diff
--- a/dwt/internal/Library.d	Sat Apr 26 10:01:48 2008 +0200
+++ b/dwt/internal/Library.d	Mon May 05 00:12:38 2008 +0200
@@ -13,6 +13,7 @@
 module dwt.internal.Library;
 
 import tango.util.Convert;
+import dwt.dwthelper.utils;
 
 // do it here, so it can be evaluated at compile time
 // this saves a static ctor.
@@ -47,14 +48,14 @@
     public static const int SWT_VERSION = .buildSWT_VERSION(MAJOR_VERSION, MINOR_VERSION);
 
     version( Windows ){
-        static const char[] SEPARATOR = "\r\n";
+        static const String SEPARATOR = "\r\n";
     }
     else {
         static assert( false, "only windows supported for this port" );
     }
 
 
-static int parseVersion(char[] aVersion) {
+static int parseVersion(String aVersion) {
     if (aVersion == null) return 0;
     int major = 0, minor = 0, micro = 0;
     int length = aVersion.length, index = 0, start = 0;
@@ -101,7 +102,7 @@
     return .buildSWT_VERSION(major, minor);
 }
 /+ PORTING_LEFT
-static bool extract (char[] fileName, char[] mappedName) {
+static bool extract (String fileName, String mappedName) {
     FileOutputStream os = null;
     InputStream is = null;
     File file = new File(fileName);
@@ -137,7 +138,7 @@
     return false;
 }
 
-static bool load (char[] libName) {
+static bool load (String libName) {
     try {
         if (libName.indexOf (SEPARATOR) != -1) {
             System.load (libName);
@@ -160,7 +161,7 @@
  *
  * @param name the name of the library to load
  */
-public static void loadLibrary (char[] name) {
+public static void loadLibrary (String name) {
     loadLibrary (name, true);
 }
 
@@ -176,7 +177,7 @@
  * @param name the name of the library to load
  * @param mapName true if the name should be mapped, false otherwise
  */
-public static void loadLibrary (char[] name, boolean mapName) {
+public static void loadLibrary (String name, boolean mapName) {
 
     /* Compute the library name and mapped name */
     String libName1, libName2, mappedName1, mappedName2;