[glib] gclosure: Add G_TYPE_ENUM and G_TYPE_PARAM for g_cclosure_marshal_generic()
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gclosure: Add G_TYPE_ENUM and G_TYPE_PARAM for g_cclosure_marshal_generic()
- Date: Mon, 20 Jun 2011 18:02:47 +0000 (UTC)
commit 5e64717a5ffb61c51ca936d51d0d38e5abc08c3a
Author: Colin Walters <walters verbum org>
Date: Mon Jun 20 11:15:27 2011 -0400
gclosure: Add G_TYPE_ENUM and G_TYPE_PARAM for g_cclosure_marshal_generic()
These are fundamental types missed in the original commit.
gobject/gclosure.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gclosure.c b/gobject/gclosure.c
index 25002a0..9cce0b8 100644
--- a/gobject/gclosure.c
+++ b/gobject/gclosure.c
@@ -954,6 +954,7 @@ value_to_ffi_type (const GValue *gvalue, gpointer *value)
case G_TYPE_BOOLEAN:
case G_TYPE_CHAR:
case G_TYPE_INT:
+ case G_TYPE_ENUM:
rettype = &ffi_type_sint;
*value = (gpointer)&(gvalue->data[0].v_int);
break;
@@ -966,6 +967,7 @@ value_to_ffi_type (const GValue *gvalue, gpointer *value)
case G_TYPE_STRING:
case G_TYPE_OBJECT:
case G_TYPE_BOXED:
+ case G_TYPE_PARAM:
case G_TYPE_POINTER:
case G_TYPE_INTERFACE:
case G_TYPE_VARIANT:
@@ -1052,9 +1054,15 @@ value_from_ffi_type (GValue *gvalue, gpointer *value)
case G_TYPE_BOXED:
g_value_set_boxed (gvalue, *(gpointer*)value);
break;
+ case G_TYPE_ENUM:
+ g_value_set_enum (gvalue, *(gint*)value);
+ break;
case G_TYPE_FLAGS:
g_value_set_flags (gvalue, *(guint*)value);
break;
+ case G_TYPE_PARAM:
+ g_value_set_param (gvalue, *(gpointer*)value);
+ break;
case G_TYPE_OBJECT:
g_value_set_object (gvalue, *(gpointer*)value);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]