projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82fae72
)
Bug 660851: Update GIO for changes in GThread API
author
Chun-wei Fan
<fanchunwei@src.gnome.org>
Tue, 4 Oct 2011 15:52:38 +0000
(23:52 +0800)
committer
Chun-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
patch
|
blob
|
history
diff --git
a/gio/gsocket.c
b/gio/gsocket.c
index
a03be77
..
c3c1ac6
100644
(file)
--- a/
gio/gsocket.c
+++ b/
gio/gsocket.c
@@
-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
}