You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general, most C APIs that register callbacks have a void* parameter in the callback, and in the function that registers it, for passing arbitrary client state. Otherwise the callback implementation can only access global state.
Mir’s API lacks this. So for example, I’ve found the function MIR_write_with_func almost unusable because my callback doesn’t know where to put the data given to it; I’d have to create a global/static variable pointing to my data buffer.
The functions that take such callbacks are:
MIR_set_error_func
MIR_write_with_func
MIR_write_module_with_func
MIR_read_with_func
MIR_link (at least for the import_resolver)
The text was updated successfully, but these errors were encountered:
In general, most C APIs that register callbacks have a
void*
parameter in the callback, and in the function that registers it, for passing arbitrary client state. Otherwise the callback implementation can only access global state.Mir’s API lacks this. So for example, I’ve found the function
MIR_write_with_func
almost unusable because my callback doesn’t know where to put the data given to it; I’d have to create a global/static variable pointing to my data buffer.The functions that take such callbacks are:
MIR_set_error_func
MIR_write_with_func
MIR_write_module_with_func
MIR_read_with_func
MIR_link
(at least for theimport_resolver
)The text was updated successfully, but these errors were encountered: