Seg fault when calling C code
bearophile via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 15 14:50:59 PDT 2014
Ali Çehreli:
> I don't think that should even be allowed. C functions should
> not know or be compatible with 'ref' D parameters. Define the
> arguments as simple 'double *' or 'const double *'.
Time ago I suggested something like that, that is not meaningful
to accept extern(C) function signatures with ref, [], fixed-sized
arrays, lazy arguments, associative arrays, pure, and so on,
because the C side doesn't know about those things or can't
enforce them (like purity). Walter didn't agree with me, but I
didn't understand his answer (or I don't remember it now).
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list