C to D bindings: how much do you D-ify the code?
Mike Parker
aldacron at gmail.com
Sat Oct 26 07:52:42 PDT 2013
On 10/26/2013 9:09 PM, Benjamin Thaut wrote:
> Am 25.10.2013 15:10, schrieb Lionello Lunesu:
>>
>> 1. enum names vs prefixes
>> enum FOO { FOO_A, FOO_B }; -> enum FOO {A,B}
>>
>
>
> I actually do number 1 whenever creating C bindings. Because its not
> really DRY to write: FOO.FOO_A
>
alias FOO = int;
enum { FOO_A, FOO_B };
Otherwise, it doesn't match the C API.
More information about the Digitalmars-d
mailing list