Closed gnif closed 6 years ago
You can always associate any amount of "user data" using the well-known "embed into your own structure and offset the pointer" pattern (yep, that's not a canonical name of that pattern ;-)).
For reference, you can look at the real-world example of integrating uzlib with MicroPython: https://github.com/micropython/micropython/blob/master/extmod/moduzlib.c#L51
Unless I am mistaken, when using the
readSource
callback there is no way to associate data with the instance.I suggest adding an additional
void *opaque
on theTINF_DATA
structure for this purpose.