[Spice-devel] [spice-gtk 1/2] channel-usbredir: if disabled, define type without private
Frediano Ziglio
fziglio at redhat.com
Sat May 4 17:54:37 UTC 2019
>
> From: Victor Toso <me at victortoso.com>
>
> Otherwise we'll get
>
> g_type_add_instance_private: assertion 'private_size > 0' failed
>
> Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked
> ---
> src/channel-usbredir.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
> index 3562164..f801c8e 100644
> --- a/src/channel-usbredir.c
> +++ b/src/channel-usbredir.c
> @@ -101,12 +101,11 @@ static void usbredir_lock_lock(void *user_data);
> static void usbredir_unlock_lock(void *user_data);
> static void usbredir_free_lock(void *user_data);
>
> +G_DEFINE_TYPE_WITH_PRIVATE(SpiceUsbredirChannel, spice_usbredir_channel,
> SPICE_TYPE_CHANNEL)
> #else
> -struct _SpiceUsbredirChannelPrivate {
> -};
> +G_DEFINE_TYPE(SpiceUsbredirChannel, spice_usbredir_channel,
> SPICE_TYPE_CHANNEL)
> #endif
>
> -G_DEFINE_TYPE_WITH_PRIVATE(SpiceUsbredirChannel, spice_usbredir_channel,
> SPICE_TYPE_CHANNEL)
>
> /* ------------------------------------------------------------------ */
>
Frediano
More information about the Spice-devel
mailing list