mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
ffi: Marshal flags like enums
Flags are enums. Fixes broken marshalling on BE 64bit architectures. https://bugzilla.gnome.org/show_bug.cgi?id=754882
This commit is contained in:
committed by
Benjamin Otte
parent
846e206146
commit
7b685eab88
@@ -1186,9 +1186,15 @@ value_to_ffi_type (const GValue *gvalue,
|
||||
*value = enum_tmpval;
|
||||
*tmpval_used = TRUE;
|
||||
break;
|
||||
case G_TYPE_FLAGS:
|
||||
g_assert (enum_tmpval != NULL);
|
||||
rettype = &ffi_type_uint;
|
||||
*enum_tmpval = g_value_get_flags (gvalue);
|
||||
*value = enum_tmpval;
|
||||
*tmpval_used = TRUE;
|
||||
break;
|
||||
case G_TYPE_UCHAR:
|
||||
case G_TYPE_UINT:
|
||||
case G_TYPE_FLAGS:
|
||||
rettype = &ffi_type_uint;
|
||||
*value = (gpointer)&(gvalue->data[0].v_uint);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user