mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Bug 660851: Update GIO for changes in GThread API
gsocket.c: Use intern string instead of GStaticPrivate/ g_static_private_set, as Dan suggested.
This commit is contained in:
parent
82fae72ae9
commit
53fb4e9867
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user