Re: Transferring global variables from D to C

2011-10-01 Thread Jimmy Cao
I'm not sure. Try __gshared string str = "a"; 2011/10/1 Dainius (GreatEmerald) > > However, this gets quite inefficient with a lot of different strings, > > I just had an idea, perhaps it's possible to work around this > particular point by creating a wrapper function that converts the > passed

Re: Transferring global variables from D to C

2011-10-01 Thread Dainius (GreatEmerald)
> However, this gets quite inefficient with a lot of different strings, I just had an idea, perhaps it's possible to work around this particular point by creating a wrapper function that converts the passed variable into the C string type? The problem with this idea is that I can't find a way to p

Transferring global variables from D to C

2011-10-01 Thread Dainius (GreatEmerald)
I'm testing how I could use globals in C, when using D as a library and C as a frontend. So far it seems to be working well with some data types, but not so much with a few others. First of all, one obvious problem is strings, since they are a lot different in D. I can transfer them with a wrapper