From: Kevin S. <kev...@ho...> - 2001-08-17 06:17:57
|
As I mentioned in a private email, I'm surprised that Ruby does not offer a function to convert a C data pointer into the object that wrapped it. I suppose in some cases multiple ruby objects would wrap a single C pointer (?). I guess that makes sense, now that I think about it. So, it looks like we should have our own map, probably in the form of a ruby hash created in C++, and updated each time we create or delete an object. I think it would make sense to use the C++ pointer as the key, and the ruby object VALUE as the value. This way, we can store the callback data item in the ruby part of our object, along with any similar data we need in the future. Kevin |