The above two lines change was a mistake. What about:

qxl_spice_update_area_async(...)
{
#ifdef ..
  if (async) {
     qxl->ssd.worker->update_area_async(...)
  } else {
     qxl_spice_update_area(...)
  }
#else
  qxl_spice_update_area(...)
#endif
}

I would do

if (async) {
#if ...
  worker->foo_async()
#else
  abort() /* should hot happen */
#endif
} else {
  worker->foo
}

yeah, I'll throw that, malloc something, cast to cookie, pass it, cast back, 
free.

cookie should be big enougth to store the info directly. malloc works too though.

Doing a runtime check here is pointless, just use
#if SPICE_INTERFACE_QXL_MINOR>= 1
...
#endif
this is a runtime check - what's preventing someone from compiling with 3.1 and 
running with 3.0?
that we will require a newer library version? (which I am yet to send a patch 
for)

Yes, thats why the minor version of the shared library needs to be raised.

cheers,
  Gerd

Reply via email to