Am 25.01.2012 15:40, schrieb Anthony Liguori: > On 01/25/2012 08:23 AM, Jan Kiszka wrote: >> On 2012-01-25 15:00, Anthony Liguori wrote: >>> On 01/25/2012 02:37 AM, Jan Kiszka wrote: >>>> On 2012-01-25 00:03, Anthony Liguori wrote: >>>>> They're exactly the same size (16 lines). If you embed TypeInfo into >>>>> DeviceTypeInfo, and introduce a Device specific type registration >>>>> function, then you could do: >>>>> >>>>> static DeviceTypeInfo my_device_type_info = { >>>>> .type.name = TYPE_MY_DEVICE, >>>>> .type.parent = TYPE_PARENT_DEVICE, >>>>> .reset = my_device_reset, >>>> >>>> And if you introduce some >>>> >>>> #define TYPE_UNIMPLEMENTED (void *)&dummy_variable >>> >>> (void *) isn't compatible with integers or function pointers (at least >>> not in a portable way). > > I don't see how they can be compatible since on some platforms > sizeof(void (*)(void)) != sizeof(void *).
Do you have an example of a platform relevant to QEMU? Microcontrollers and DOS come to my mind. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg