Why I need this? I'm using C++, not C. With that int, I would be able to get the instance of the object for that callback. Without such a user data parameter, I am not able to do this in an easy way. Lots of libraries are already providing such a parameter. But a lot of libraries are not. Would be cool if they did.
three comments, already:
I know what you mean. It seems like such an obvious thing that you’d want to know what the callback applies to, but some developers seem not to understand that. You’d think they’d have seen the pattern often enough that they’d at least mimic it .
Steven - 30 05 05 - 17:08
Maybe if you provide something like this people will use it?
typedef void (*IrrCallback)(void *self);
josh () (link) - 31 05 05 - 19:34
I feel with you. Had these problems too.
lxguy - 01 06 05 - 15:09