Bug 660851: Update GIO for changes in GThread API
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 4 Oct 2011 15:52:38 +0000 (23:52 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 4 Oct 2011 16:57:34 +0000 (00:57 +0800)
gsocket.c: Use intern string instead of GStaticPrivate/
           g_static_private_set, as Dan suggested.

gio/gsocket.c

index a03be77..c3c1ac6 100644 (file)
@@ -217,13 +217,15 @@ socket_strerror (int err)
 #ifndef G_OS_WIN32
   return g_strerror (err);
 #else
-  static GStaticPrivate last_msg = G_STATIC_PRIVATE_INIT;
+  const char *msg_ret;
   char *msg;
 
   msg = g_win32_error_message (err);
-  g_static_private_set (&last_msg, msg, g_free);
 
-  return msg;
+  msg_ret = g_intern_string (msg);
+  g_free (msg);
+
+  return msg_ret;
 #endif
 }