Re: wrapping C code - my exercise in incompetence.

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 */);   

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu