diff options
author | Benjamin Otte <otte@redhat.com> | 2012-01-01 21:51:40 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-01-14 01:15:16 +0100 |
commit | 9d52243790aa460c228bdcf7ee8e28f78ecd7b13 (patch) | |
tree | 58430c0e9b1fe741ac1b6a7a87793faa32e2c688 /gobject | |
parent | 86cd3018e0c5205707b2db8b9cc8537c2f60678d (diff) | |
download | glib-9d52243790aa460c228bdcf7ee8e28f78ecd7b13.tar.gz |
values: Use v_pointer for g_value_set_gtype()
... and g_value_get_gtype(). G_TYPE_GTYPE is a pointer type, so it's
values should use the v_pointer member. This is especially true, because
the value collectors from varargs in gvaluecollector.h use that, too.
This should only cause issues when sizeof(glong) != sizeof(gpointer),
and I'm not aware of any such platform. Maybe win64?
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gvaluetypes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c index 563699027..799dfdd3e 100644 --- a/gobject/gvaluetypes.c +++ b/gobject/gvaluetypes.c @@ -1187,7 +1187,7 @@ g_value_set_gtype (GValue *value, { g_return_if_fail (G_VALUE_HOLDS_GTYPE (value)); - value->data[0].v_long = v_gtype; + value->data[0].v_pointer = GSIZE_TO_POINTER (v_gtype); } @@ -1206,7 +1206,7 @@ g_value_get_gtype (const GValue *value) { g_return_val_if_fail (G_VALUE_HOLDS_GTYPE (value), 0); - return value->data[0].v_long; + return GPOINTER_TO_SIZE (value->data[0].v_pointer); } /** |