Commit Graph

10 Commits

Author SHA1 Message Date
Frediano Ziglio
8c458fa35e Fix g_memdup deprecation warning with glib >= 2.68
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-05-05 06:35:56 +01:00
Frediano Ziglio
78193dff16 red-channel-capabilities: Removed unused stuff from RedChannelCapabilities
Not used anymore

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:09 +01:00
Frediano Ziglio
e788e6e476 Remove conversion warnings
Use casts to avoid all that warning.
They should go away once you use more type safe types.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:08 +01:00
Victor Toso
9e29b72461 red-channel: no need to call g_type_init()
Since 03d46e9e "build-sys: Raise glib requirement to 2.38" in
2019-02-05

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-02-26 13:01:51 +00:00
Frediano Ziglio
ed68d491fd Do not check for HAVE_CONFIG_H
This should always be defined and including config.h is a requirement.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-04-30 09:26:55 +01:00
Frediano Ziglio
de5b166b71 Remove common/mem.h includes
common/mem.h contains mainly memory allocation functions.
As we decided to move to Glib calls directly avoid to include
function declaration we should not use anymore.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-11-21 08:27:09 +00:00
Frediano Ziglio
a99043771a Start using GLib memory allocation
Start reducing the usage of spice_new*/spice_malloc allocations.
They were designed in a similar way to GLib ones.
Now that we use GLib make sense to remove them.
However the versions we support for GLib can use different memory
allocators so we have to match g_free with GLib allocations
and spice_* ones (which uses always malloc allocator) with free().
This patch remove some easy ones.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-09-19 16:17:10 +01:00
Frediano Ziglio
3377feef5a Initialize earlier GLib type system if necessary
Before GLib 2.36 you should call g_type_init before attempting
any GLib type usage.
As constructor function are called before even main we need
to call g_type_init much before do_spice_init.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-30 18:05:30 +01:00
Frediano Ziglio
afc4171c98 red-channel: Use RedChannelCapabilities directly to pass capabilities
For each channel there are two set of capabilities, one
for the common ones and one for the specific ones.
A single set were almost always passed using 2 arguments,
a number of elements and an array but then before using
these were converted to a GArray.
Use a single structure (already available) to pass all
channel capabilites using a single argument.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-03-02 15:34:58 +00:00
Frediano Ziglio
89a722ce03 red-channel: Separate RedChannelCapabilities
Add function to initialize and destroy this type.
Add GType type for boxing it.
These changes a in preparation for next patch.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-02 15:32:16 +00:00