mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
ginvoke: support conversion of fundamental type GParamSpec values
https://bugzilla.gnome.org/show_bug.cgi?id=683265
This commit is contained in:
parent
56048fc81c
commit
1eb27e4bf8
@ -52,6 +52,7 @@ value_to_ffi_type (const GValue *gvalue, gpointer *value)
|
||||
case G_TYPE_OBJECT:
|
||||
case G_TYPE_BOXED:
|
||||
case G_TYPE_POINTER:
|
||||
case G_TYPE_PARAM:
|
||||
rettype = &ffi_type_pointer;
|
||||
*value = (gpointer)&(gvalue->data[0].v_pointer);
|
||||
break;
|
||||
@ -118,6 +119,7 @@ g_value_to_ffi_return_type (const GValue *gvalue,
|
||||
case G_TYPE_OBJECT:
|
||||
case G_TYPE_BOXED:
|
||||
case G_TYPE_POINTER:
|
||||
case G_TYPE_PARAM:
|
||||
rettype = &ffi_type_pointer;
|
||||
break;
|
||||
case G_TYPE_FLOAT:
|
||||
@ -198,6 +200,9 @@ g_value_from_ffi_value (GValue *gvalue,
|
||||
case G_TYPE_BOXED:
|
||||
g_value_set_boxed (gvalue, (gpointer)value->v_pointer);
|
||||
break;
|
||||
case G_TYPE_PARAM:
|
||||
g_value_set_param (gvalue, (gpointer)value->v_pointer);
|
||||
break;
|
||||
default:
|
||||
g_warning ("Unsupported fundamental type: %s",
|
||||
g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue))));
|
||||
|
Loading…
Reference in New Issue
Block a user