Oh, my bad! I don't know how I missed the definition of foo().
As for *c_void vs opaque {}, AFAIK they're functionally identical, but opaque {} allows you to define a strong type alias whereas *c_void will accept just about any pointer. In retrospect, it probably doesn't matter very much in this specific case, but it seems good form anyway.
For further actions, you may consider blocking this person and/or reporting abuse
foo() is defined at the very top of the post.
I'm not sure how to feel about using
*c_void. Does usingopaquechange the code/cast in a good way?Oh, my bad! I don't know how I missed the definition of
foo().As for
*c_voidvsopaque {}, AFAIK they're functionally identical, butopaque {}allows you to define a strong type alias whereas*c_voidwill accept just about any pointer. In retrospect, it probably doesn't matter very much in this specific case, but it seems good form anyway.