D interface for C library problems

1100110 0b1100110 at gmail.com
Tue Oct 16 00:05:27 PDT 2012


On Tue, 16 Oct 2012 01:42:07 -0500, Jacob Carlborg <doob at me.com> wrote:

> On 2012-10-16 01:33, 1100110 wrote:
>
>> Also the names of the particular fields do not have to match exactly.
>> In a few C projects, you will find a field with the name 'version' which
>> is a D keyword.
>>
>> It seems to work just fine if you simply change it to 'ver' on similar.
>>
>> Take a look at the deimos project to see a few examples in action.
>> (Also please attempt to get it into deimos if that is what you are
>> thinking about.)
>
> For structs the size only need to be the same. Depending on how you  
> operate on the struct the size of the individual fields, alignment and  
> padding should match as well.
>

That's what I suspected, but It's nice to know that for a fact.
Thank you.
-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list