From 75f974d1d9ceaaceeb6675db76ec1d7aed511fdd Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 1 Aug 2007 09:49:02 +0000 Subject: [PATCH] Drop leftover use of a union. 2007-08-01 Tor Lillqvist * glib/gutils.c (get_special_folder): Drop leftover use of a union. svn path=/trunk/; revision=5661 --- ChangeLog | 3 +++ glib/gutils.c | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 554ba2a..17e4e62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-08-01 Tor Lillqvist + * glib/gutils.c (get_special_folder): Drop leftover use of a + union. + * glibconfig.h.win32.in: Update to match what configure produces. 2007-07-31 Matthias Clasen diff --git a/glib/gutils.c b/glib/gutils.c index 4279a24..eb28e50 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -1409,10 +1409,7 @@ static gchar **g_user_special_dirs = NULL; static gchar * get_special_folder (int csidl) { - union { - char c[MAX_PATH+1]; - wchar_t wc[MAX_PATH+1]; - } path; + wchar_t path[MAX_PATH+1]; HRESULT hr; LPITEMIDLIST pidl = NULL; BOOL b; @@ -1421,9 +1418,9 @@ get_special_folder (int csidl) hr = SHGetSpecialFolderLocation (NULL, csidl, &pidl); if (hr == S_OK) { - b = SHGetPathFromIDListW (pidl, path.wc); + b = SHGetPathFromIDListW (pidl, path); if (b) - retval = g_utf16_to_utf8 (path.wc, -1, NULL, NULL, NULL); + retval = g_utf16_to_utf8 (path, -1, NULL, NULL, NULL); CoTaskMemFree (pidl); } return retval; -- 2.7.4