diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2021-04-09 13:33:08 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2021-04-09 21:20:13 +0400 |
commit | 84a88176b15d65cad05d2a10c22e50b74410f634 (patch) | |
tree | 4096e3d10cbc6740c16102944341627d5bab8e1c | |
parent | 94717418e57abc979c2fe699487219879da624bb (diff) |
Fix g-i class size binding
gir fails to compute the size of the array, which results in invalid
class size. Deprecate usage of SPICE_RESERVED_PADDING, which isn't that
useful anyway.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r-- | src/smartcard-manager.h | 2 | ||||
-rw-r--r-- | src/spice-audio.h | 2 | ||||
-rw-r--r-- | src/spice-channel.h | 2 | ||||
-rw-r--r-- | src/spice-session.h | 2 | ||||
-rw-r--r-- | src/spice-util.h | 3 | ||||
-rw-r--r-- | src/usb-device-manager.h | 2 |
6 files changed, 7 insertions, 6 deletions
diff --git a/src/smartcard-manager.h b/src/smartcard-manager.h index 3ee519e..b7a8b25 100644 --- a/src/smartcard-manager.h +++ b/src/smartcard-manager.h @@ -85,7 +85,7 @@ struct _SpiceSmartcardManagerClass * If adding fields to this struct, remove corresponding * amount of padding to avoid changing overall struct size */ - gchar _spice_reserved[SPICE_RESERVED_PADDING]; + gpointer _spice_reserved[10]; }; GType spice_smartcard_manager_get_type(void); diff --git a/src/spice-audio.h b/src/spice-audio.h index c033455..d6ecf64 100644 --- a/src/spice-audio.h +++ b/src/spice-audio.h @@ -95,7 +95,7 @@ struct _SpiceAudioClass { guint16 **volume, GError **error); - gchar _spice_reserved[SPICE_RESERVED_PADDING - 4 * sizeof(void *)]; + gpointer _spice_reserved[6]; }; GType spice_audio_get_type(void); diff --git a/src/spice-channel.h b/src/spice-channel.h index ec4a356..1e163eb 100644 --- a/src/spice-channel.h +++ b/src/spice-channel.h @@ -119,7 +119,7 @@ struct _SpiceChannelClass * If adding fields to this struct, remove corresponding * amount of padding to avoid changing overall struct size */ - gchar _spice_reserved[SPICE_RESERVED_PADDING - 2 * sizeof(void *)]; + gpointer _spice_reserved[8]; }; GType spice_channel_get_type(void); diff --git a/src/spice-session.h b/src/spice-session.h index 07c7b14..d54ad41 100644 --- a/src/spice-session.h +++ b/src/spice-session.h @@ -101,7 +101,7 @@ struct _SpiceSessionClass * If adding fields to this struct, remove corresponding * amount of padding to avoid changing overall struct size */ - gchar _spice_reserved[SPICE_RESERVED_PADDING]; + gpointer _spice_reserved[10]; }; GType spice_session_get_type(void); diff --git a/src/spice-util.h b/src/spice-util.h index fd1adc3..421b4b0 100644 --- a/src/spice-util.h +++ b/src/spice-util.h @@ -37,7 +37,8 @@ gchar* spice_uuid_to_string(const guint8 uuid[16]); g_debug(G_STRLOC " " fmt, ## __VA_ARGS__); \ } while (0) -#define SPICE_RESERVED_PADDING (10 * sizeof(void*)) + +#define SPICE_RESERVED_PADDING (10 * sizeof(void*)) GLIB_DEPRECATED_MACRO G_END_DECLS diff --git a/src/usb-device-manager.h b/src/usb-device-manager.h index d8d1cb8..4747dd4 100644 --- a/src/usb-device-manager.h +++ b/src/usb-device-manager.h @@ -93,7 +93,7 @@ struct _SpiceUsbDeviceManagerClass * If adding fields to this struct, remove corresponding * amount of padding to avoid changing overall struct size */ - gchar _spice_reserved[SPICE_RESERVED_PADDING]; + gpointer _spice_reserved[10]; }; GType spice_usb_device_get_type(void); |