mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +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
|
#ifndef G_OS_WIN32
|
||||||
return g_strerror (err);
|
return g_strerror (err);
|
||||||
#else
|
#else
|
||||||
static GStaticPrivate last_msg = G_STATIC_PRIVATE_INIT;
|
const char *msg_ret;
|
||||||
char *msg;
|
char *msg;
|
||||||
|
|
||||||
msg = g_win32_error_message (err);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user