Dainius (GreatEmerald):

> OK, now I have a question about passing variables. In D, I have a
> dynamic array of strings and I want C to get that array. Yet C
> supports neither dynamic arrays nor strings. So is there a way to
> accomplish this?

To use a D data structure from C you need first of all to know what exactly 
those data structures are.

In this case one solution is to create (from D) a dynamic array of char*, then 
perform a map!toStringz to convert the strings to C strings, and then call the 
C code with the ptr and length of this dynamic array of pointers.

There are other solutions, according to the amount of data you want to copy or 
according to the amount of C code you want to write to access the D data 
structures.

Bye,
bearophile

Reply via email to