Dear library developers,

It's nice that you all create your libraries and provide functions for registering C function callbacks. But please, PLEASE, would you be so kind and add one additional senseless userdata int to your callback which will be set by the library user when registering the callback and will be provided when your library calls the callback? Would be so sweet.
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?

namespace irr
namespace core
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

Remember personal info?
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.