mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 09:39:27 +00:00
Remove GSlice use
It's being slowly deprecated in glib https://bugzilla.gnome.org/show_bug.cgi?id=754687 Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
400a5d13cf
commit
5a603f2b63
2
NEWS
2
NEWS
@ -9,8 +9,6 @@ keep the code as functional as 0.12, but regressions or bugs could still happen.
|
||||
* Start of a large code rework to attempt to make the codebase more
|
||||
maintainable. With this first release, the huge red_worker.c file has been split
|
||||
in multiple smaller files.
|
||||
* glib's GSlice is now used in some places, G_SLICE=(debug_blocks|always_malloc) may
|
||||
be needed in order to debug some memory issues.
|
||||
|
||||
* Added public spice_server_set_keepalive_timeout() to make it possible
|
||||
to tweak keepalive on all SPICE connection. This can prevent unwanted
|
||||
|
||||
@ -95,7 +95,7 @@ static CursorItem *cursor_item_new(QXLInstance *qxl, RedCursorCmd *cmd, uint32_t
|
||||
|
||||
spice_return_val_if_fail(cmd != NULL, NULL);
|
||||
|
||||
cursor_item = g_slice_new0(CursorItem);
|
||||
cursor_item = g_new0(CursorItem, 1);
|
||||
cursor_item->qxl = qxl;
|
||||
cursor_item->refs = 1;
|
||||
cursor_item->group_id = group_id;
|
||||
@ -131,7 +131,7 @@ static void cursor_item_unref(CursorItem *item)
|
||||
red_put_cursor_cmd(cursor_cmd);
|
||||
free(cursor_cmd);
|
||||
|
||||
g_slice_free(CursorItem, item);
|
||||
g_free(item);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1134,7 +1134,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt* spice_replay_next_cmd(SpiceReplay *replay,
|
||||
replay_handle_dev_input(worker, replay, type);
|
||||
}
|
||||
}
|
||||
cmd = g_slice_new(QXLCommandExt);
|
||||
cmd = g_new(QXLCommandExt, 1);
|
||||
cmd->cmd.type = type;
|
||||
cmd->group_id = 0;
|
||||
spice_debug("command %"PRIu64", %d\r", timestamp, cmd->cmd.type);
|
||||
@ -1195,7 +1195,7 @@ SPICE_GNUC_VISIBLE void spice_replay_free_cmd(SpiceReplay *replay, QXLCommandExt
|
||||
break;
|
||||
}
|
||||
|
||||
g_slice_free(QXLCommandExt, cmd);
|
||||
g_free(cmd);
|
||||
}
|
||||
|
||||
/* caller is incharge of closing the replay when done and releasing the SpiceReplay
|
||||
|
||||
Loading…
Reference in New Issue
Block a user