Commit 974692bd authored by Frediano Ziglio's avatar Frediano Ziglio
Browse files

spice-qxl: Fix typo in callback name and remove obsolete parameter



attache_worker was always spelled wrongly.
Use anonymous union (standard feature already used in different
code in SPICE) to have an aliased attached_worker function.
Also removed a parameter from this new callback and deprecate
the old.
Due to C ABI removing a parameter is not an issue,
red-qxl.c:red_qxl_attach_worker will continue to pass the parameter,
new code will ignore, old code will receive it.
Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
parent 68264872
Pipeline #132939 passed with stage
in 13 minutes and 4 seconds
......@@ -185,7 +185,10 @@ struct QXLDevSurfaceCreate {
struct QXLInterface {
SpiceBaseInterface base;
void (*attache_worker)(QXLInstance *qin, QXLWorker *qxl_worker);
union {
void (*attache_worker)(QXLInstance *qin, QXLWorker *qxl_worker) SPICE_GNUC_DEPRECATED;
void (*attached_worker)(QXLInstance *qin);
};
void (*set_compression_level)(QXLInstance *qin, int level);
void (*set_mm_time)(QXLInstance *qin, uint32_t mm_time) SPICE_GNUC_DEPRECATED;
......
......@@ -73,7 +73,7 @@ static QXLDevMemSlot slot = {
.qxl_ram_size = ~0,
};
static void attach_worker(QXLInstance *qin, SPICE_GNUC_UNUSED QXLWorker *_qxl_worker)
static void attached_worker(QXLInstance *qin)
{
static int count = 0;
if (++count > 1) {
......@@ -250,7 +250,7 @@ static QXLInterface display_sif = {
.major_version = SPICE_INTERFACE_QXL_MAJOR,
.minor_version = SPICE_INTERFACE_QXL_MINOR
},
.attache_worker = attach_worker,
.attached_worker = attached_worker,
.set_compression_level = set_compression_level,
.get_init_info = get_init_info,
.get_command = get_display_command,
......
......@@ -423,7 +423,7 @@ static QXLDevMemSlot slot = {
.qxl_ram_size = ~0,
};
static void attache_worker(QXLInstance *qin, SPICE_GNUC_UNUSED QXLWorker *_qxl_worker)
static void attached_worker(QXLInstance *qin)
{
Test *test = SPICE_CONTAINEROF(qin, Test, qxl_instance);
......@@ -797,7 +797,7 @@ static QXLInterface display_sif = {
.major_version = SPICE_INTERFACE_QXL_MAJOR,
.minor_version = SPICE_INTERFACE_QXL_MINOR
},
.attache_worker = attache_worker,
.attached_worker = attached_worker,
.set_compression_level = set_compression_level,
.get_init_info = get_init_info,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment