>>I propose that we change the function signature of the functions and the 
>>callback to include a (void *) context pointer:
>>
>>SANE_Status
>>sanei_usb_find_devices (SANE_Int vendor, SANE_Int product, void *context,
>>            SANE_Status (*attach) (SANE_String_Const dev, void *context));
>>
>>void
>>sanei_usb_attach_matching_devices (const char *name, void *context,
>>                   SANE_Status (*attach) (const char *dev, void *context));
>>
>Hi Ralph,
>
>Your change may impact proprietary backends (Brother, Canon, ...).
>
>Thierry 
>

Would it be possible to rely on the relative position of `const char *dev` 
inside the device structure by making use of `container_of()` ?

Olivier

Reply via email to