extern (c) struct ?

Robert M. Münch robert.muench at saphirion.com
Fri Mar 9 07:32:28 UTC 2018


On 2018-03-08 16:03:57 +0000, Adam D. Ruppe said:

> How are you accessing it? If it is by pointer only passing it to 
> methods, you can simply:
> 
> struct my_cpp_struct;
> 
> and define functions:
> 
> extern(C)
> void foo(my_cpp_struct* arg);

Hi, :-/ seems I was a bit confused by all the backs and forth on my 
side. Yes, this will of course work and is sufficient to move on. And 
the defined functions can be aliased, right?

> then just declare functions you need and always use as opaque pointer.

When running in the VisualD environment in debugging mode, I can't dive 
into the my_cpp_struct. Seems the debugger doesn't uncover opaque 
pointers. Or do I need to tell it somehow about it?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20180309/65e9d372/attachment.html>


More information about the Digitalmars-d-learn mailing list