On 2010-09-11 15:13, Simen kjaeraas wrote:
Why does the function expect a char*? If it is an external C function,
and it might change the passed values, you should make a duplicate
mutable string, or use char[] in lieu of string.

If it is an external C function that will *not* change the passed
values, and you have write access to the D headers to interface to C,
use const char* instead. If no write access, I would use
cast(char*)myString.ptr.

Yes, it's external C function and I can modify bindings (just bindings, not ABI). Now I'll trace back library which is interfacing to me and possibly fix bindings.

You helped me already, thanks a lot. I can already go on (this language is so cool btw.).

Reply via email to