Using D libs in C

Dainius (GreatEmerald) pastas4 at gmail.com
Fri Apr 15 09:01:26 PDT 2011


All right, found something really odd today, might be a bug. If in C I
have this:

int16_t D_getPictureCoordX(int Pool, int Card);

And in D I have this:

short D_getPictureCoordX(int Pool, int Card);

When I call D_getPictureCoord() from C, the parameters are all off, it
seems that it receives either a random memory bit or the parameters
are not in the same order as they should be. However, this only
happens in Linux using 64-bit DMD, on Windows it works just fine.


More information about the Digitalmars-d-learn mailing list