[M3devel] Referencing opaque C structs in M3 code?

Chris Highjinks at gmx.com
Thu Mar 4 22:29:36 CET 2010


Alright, this has thrown me for a bit of a loop...no pun intended...

Suppose I'm linking my Modula 3 code with a C library where the public API has a declaration like this...

typedef struct opaque_foo_t opaque_foo_t;

And the type opaque_foo_t is defined in the private part of the library.

Do I need to create a seperate representation of the structure for my Modula3 program or can I just create a pointer for it and pass the pointer around? Assuming of course I dont have to actually reference anything inside opaque_foo_t.  Would I just create an UNTRACED REF Ctypes.void_star or something similiar?

I'm a little puzzled. Any help would be appreciated.



-- 
Chris <Highjinks at gmx.com>



More information about the M3devel mailing list