summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-04-09 21:19:28 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-04-09 21:20:05 +0400
commit94717418e57abc979c2fe699487219879da624bb (patch)
tree6e4357f9b6a8a8e3d86a897676c679ae0b45ef30
parenta36184001c894f25409392173e5f32c537b8b835 (diff)
Add some ABI size checks for what we are modifying next
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 <marcandre.lureau@redhat.com>
-rw-r--r--src/smartcard-manager.c2
-rw-r--r--src/spice-audio.c2
-rw-r--r--src/spice-channel.c2
-rw-r--r--src/spice-session.c2
-rw-r--r--src/usb-device-manager.c2
5 files changed, 10 insertions, 0 deletions
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,