Fixed Length Array Syntax in extern(C) Function Signatures

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 10 01:37:21 PDT 2015


On Friday, 10 July 2015 at 03:18:23 UTC, Mike Parker wrote:
>> You should just be able to replace `[4]` with `*` in the 
>> arguments.
>
> [1]http://dlang.org/interfaceToC.html

Great!

One more thing: How shall my call to `avg_image_copy()` (from D) 
look then? Is the slicing syntax `[0 .. 4]` I use above as

     av_image_copy(target.data[0 .. 4], target.linesize[0 .. 4],
                   source.data[0 .. 4], source.linesize[0 .. 4],
                   format, source.width, source.height);

the best way?


More information about the Digitalmars-d-learn mailing list