diff dwt/dnd/TextTransfer.d @ 255:5a30aa9820f3

removed tango.stdc.stringz imports and allow null for arrays and string arguments.
author Frank Benoit <benoit@tionex.de>
date Sun, 15 Jun 2008 22:32:20 +0200
parents 380bad9f6852
children c0d810de7093
line wrap: on
line diff
--- a/dwt/dnd/TextTransfer.d	Sun Jun 08 15:11:48 2008 +0200
+++ b/dwt/dnd/TextTransfer.d	Sun Jun 15 22:32:20 2008 +0200
@@ -20,8 +20,6 @@
 import dwt.dnd.DND;
 
 
-static import tango.stdc.stringz;
-
 /**
  * The class <code>TextTransfer</code> provides a platform specific mechanism
  * for converting plain text represented as a java <code>String</code>
@@ -80,7 +78,7 @@
         DND.error(DND.ERROR_INVALID_DATA);
     }
     String string = (cast(ArrayWrapperString)object).array;
-    char* utf8 = tango.stdc.stringz.toStringz(string);
+    char* utf8 = toStringz(string);
     if  (transferData.type is cast(void*) COMPOUND_TEXT_ID) {
         void* encoding;
         int format;
@@ -130,7 +128,7 @@
     char** list;
     int count = OS.gdk_text_property_to_utf8_list(transferData.type, transferData.format, transferData.pValue, transferData.length, &list);
     if (count is 0) return null;
-    String utf8 = tango.stdc.stringz.fromStringz( list[0] ).dup;
+    String utf8 = fromStringz( list[0] ).dup;
     OS.g_strfreev(list);
     return new ArrayWrapperString( utf8 );
 }