Dear library developers,

Posted on:May 30 2005

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.





Comments:


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
Quote
2005-05-30 17:08:00


Maybe if you provide something like this people will use it?

namespace irr
{
namespace core
{
typedef void (*IrrCallback)(void *self);
}
}
josh
Quote
2005-05-31 19:34:00


I feel with you. Had these problems too.
lxguy
Quote
2005-06-01 15:09:00


Add comment:


Posted by:


Enter the missing letter in: "Internati?nal"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons