From 94717418e57abc979c2fe699487219879da624bb Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 9 Apr 2021 21:19:28 +0400 Subject: Add some ABI size checks for what we are modifying next MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are about to modify the struct fields, let's make sure we don't break the ABI. Once check-abi is added to our CI, this shouldn't be needed, and can probably be reverted. Signed-off-by: Marc-André Lureau --- src/smartcard-manager.c | 2 ++ src/spice-audio.c | 2 ++ src/spice-channel.c | 2 ++ src/spice-session.c | 2 ++ src/usb-device-manager.c | 2 ++ 5 files changed, 10 insertions(+) diff --git a/src/smartcard-manager.c b/src/smartcard-manager.c index 16cf88a..bb97ad7 100644 --- a/src/smartcard-manager.c +++ b/src/smartcard-manager.c @@ -43,6 +43,8 @@ * guest using 3 certificates available to the client). */ +G_STATIC_ASSERT(sizeof(SpiceSmartcardManagerClass) == sizeof(GObjectClass) + 14 * sizeof(gpointer)); + struct _SpiceSmartcardManagerPrivate { guint monitor_id; diff --git a/src/spice-audio.c b/src/spice-audio.c index 43ece99..8a5714e 100644 --- a/src/spice-audio.c +++ b/src/spice-audio.c @@ -42,6 +42,8 @@ #include "spice-audio-priv.h" #include "spice-gstaudio.h" +G_STATIC_ASSERT(sizeof(SpiceAudioClass) == sizeof(GObjectClass) + 11 * sizeof(gpointer)); + G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(SpiceAudio, spice_audio, G_TYPE_OBJECT) enum { diff --git a/src/spice-channel.c b/src/spice-channel.c index 3ccf452..ab38571 100644 --- a/src/spice-channel.c +++ b/src/spice-channel.c @@ -46,6 +46,8 @@ #include "gio-coroutine.h" +G_STATIC_ASSERT(sizeof(SpiceChannelClass) == sizeof(GObjectClass) + 19 * sizeof(gpointer)); + static void spice_channel_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg); static void spice_channel_write_msg(SpiceChannel *channel, SpiceMsgOut *out); static void spice_channel_send_link(SpiceChannel *channel); diff --git a/src/spice-session.c b/src/spice-session.c index ed38182..d6ec344 100644 --- a/src/spice-session.c +++ b/src/spice-session.c @@ -34,6 +34,8 @@ #include "channel-playback-priv.h" #include "spice-audio-priv.h" +G_STATIC_ASSERT(sizeof(SpiceSessionClass) == sizeof(GObjectClass) + 12 * sizeof(gpointer)); + #if !defined(SOL_TCP) && defined(IPPROTO_TCP) #define SOL_TCP IPPROTO_TCP #endif diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c index 471f134..738eba5 100644 --- a/src/usb-device-manager.c +++ b/src/usb-device-manager.c @@ -67,6 +67,8 @@ * spice_usb_device_manager_get() which ensures this 1:1 relation. */ +G_STATIC_ASSERT(sizeof(SpiceUsbDeviceManagerClass) == sizeof(GObjectClass) + 14 * sizeof(gpointer)); + enum { PROP_0, PROP_SESSION, -- cgit v1.2.3