Re: wrapping C code - my exercise in incompetence.
- Posted by ssallen Mar 13, 2013
- 2964 views
Ok, that fixed a lot of my problems. Thanks everyone!
My new issue is how to deal with this:
ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream( C_ENUM aiDefaultLogStream pStreams, const char* file);
That function appears to return an actual structure and not a pointer to one. How do I deal with that? Do I have to duplicate the structure in memory by allocating and peeking/poking? The aiLogStream structure looks like this:
struct aiLogStream { /** callback to be called */ aiLogStreamCallback callback; /** user data to be passed to the callback */ char* user; };
and then, of course, the aiLogStreamCallback:
typedef void (*aiLogStreamCallback)(const char* /* message */, char* /* user */);