[glib] gsourceclosure.c: Fix build on Windows
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gsourceclosure.c: Fix build on Windows
- Date: Sun, 21 Jul 2013 19:52:22 +0000 (UTC)
commit 114b1ccf78849988567011c36dd5e868a66a3431
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jul 18 17:22:53 2013 +0800
gsourceclosure.c: Fix build on Windows
GPid is a HANDLE (aka void *) on Windows, not an int, so treat pid
accordingly on Windows, as using pid as a gulong directly would likely be
undesirable on Windows
https://bugzilla.gnome.org/show_bug.cgi?id=704447
gobject/gsourceclosure.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c
index a16b6c5..f6be8de 100644
--- a/gobject/gsourceclosure.c
+++ b/gobject/gsourceclosure.c
@@ -117,8 +117,14 @@ g_child_watch_closure_callback (GPid pid,
g_value_init (&result_value, G_TYPE_BOOLEAN);
+#ifdef G_OS_UNIX
g_value_init (¶ms[0], G_TYPE_ULONG);
g_value_set_ulong (¶ms[0], pid);
+#endif
+#ifdef G_OS_WIN32
+ g_value_init (¶ms[0], G_TYPE_POINTER);
+ g_value_set_pointer (¶ms[0], pid);
+#endif
g_value_init (¶ms[1], G_TYPE_INT);
g_value_set_int (¶ms[1], status);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]