[M3devel] Referencing opaque C structs in M3 code?
Tony Hosking
hosking at cs.purdue.edu
Thu Mar 4 22:59:42 CET 2010
You can assume that ADDRESS is entirely interchangeable with a C void *.
Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484
On 4 Mar 2010, at 16:29, Chris wrote:
> 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100304/df40625b/attachment-0002.html>
More information about the M3devel
mailing list