[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24915 - gnunet-gtk/src/lib
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24915 - gnunet-gtk/src/lib |
Date: |
Mon, 12 Nov 2012 16:57:27 +0100 |
Author: LRN
Date: 2012-11-12 16:57:27 +0100 (Mon, 12 Nov 2012)
New Revision: 24915
Modified:
gnunet-gtk/src/lib/os_installation.c
Log:
Use glib for string conversion
Modified: gnunet-gtk/src/lib/os_installation.c
===================================================================
--- gnunet-gtk/src/lib/os_installation.c 2012-11-12 15:57:23 UTC (rev
24914)
+++ gnunet-gtk/src/lib/os_installation.c 2012-11-12 15:57:27 UTC (rev
24915)
@@ -144,8 +144,8 @@
wchar_t *idx;
wchar_t *modulepath = NULL;
char *upath;
- uint8_t *u8_string;
- size_t u8_string_length;
+ gchar *u8_string;
+ glong u8_string_length;
/* This braindead function won't tell us how much space it needs, so
* we start at 1024 and double the space up if it doesn't fit, until
@@ -199,7 +199,7 @@
}
/* modulepath is GNUNET_PREFIX */
- u8_string = u16_to_u8 (modulepath, wcslen (modulepath), NULL,
&u8_string_length);
+ u8_string = g_utf16_to_utf8 (modulepath, -1, NULL, &u8_string_length, NULL);
if (NULL == u8_string)
GNUNET_abort ();
@@ -207,7 +207,7 @@
memcpy (upath, u8_string, u8_string_length);
upath[u8_string_length] = '\0';
- free (u8_string);
+ g_free (u8_string);
GNUNET_free (modulepath);
return upath;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24915 - gnunet-gtk/src/lib,
gnunet <=