On Tue, Feb 17, 2015 at 03:08:18PM +0100, Jakub Hrozek wrote:
On Tue, Feb 17, 2015 at 03:03:48PM +0100, Pavel Březina wrote:
> On 02/16/2015 04:27 PM, Jakub Hrozek wrote:
> >On Thu, Jan 22, 2015 at 01:45:59PM +0100, Pavel Březina wrote:
> >>Attached is a patch without macros...
> >>
> >>
> >
> >Awesome, this is really good. One last question before I ack:
> >Do you think the sbus_get_invoker_fn() typedef could use
> >a new typedef that expands to:
> > void (*handler_fn)(struct sbus_request *, void *, void *);
> >instead of the void* function pointer? I suppose that would make the
> >code more type-safe..
> >
> >I really like to see all the cruft going away :-)
>
> No, its not doable unfortunately.
>
> Basic types, such as strings, integers, ... uses the following parameters:
> void (*handler_fn)(struct sbus_request *, void *, void *)
>
> but array types uses:
> void (*handler_fn)(struct sbus_request *, void *, void *, int *)
>
> So we can't really specify precise type unless we want to have also
> different invoker types which would result in more code branching.
Thank you for the explanation.
In that case, ACK to the patches. Very good work removing the legacy
code!
* master: 16cf65323a41b3de4a98f309cdf900f3b0d9ec25
df4e1db5d41c903ae57fd880acc76a0ad84aa7b2