Seg fault when calling C code
Andrew Brown via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 16 08:20:24 PDT 2014
>
> I guess my confusion came about because in the page about
> interfacing with C, there's a static array example where
> parameters are given in terms D understands:
>
> extern (C)
> {
> void foo(ref int[3] a); // D prototype
> }
>
> I guess D has no problem translating that into a simple pointer
> that C can deal with. I assumed the same would be true of
> dynamic arrays, but maybe the leap is too far?
And I've finally got round to seeing the table above, it clearly
says that C array is equivalent to D pointer. Sorry for being a
time waster.
More information about the Digitalmars-d-learn
mailing list