DLL: (const char *paramNames[],size_t numParams)

Andre Pany andre at s-e-a-p.de
Mon Jul 9 10:56:18 UTC 2018


On Monday, 9 July 2018 at 10:38:54 UTC, Basile B. wrote:
> On Monday, 9 July 2018 at 10:33:03 UTC, Andre Pany wrote:
> Hi, no it's not correct i think, right translation would be
>
>     extern(C) void GetParamNames(const char** paramNames, 
> size_t numParams);
>
> If you use the D array syntax you'll get into troubles because 
> of ABI i think.
>
> Baz.

Thanks, it seems I also have to allocate the pointer before with 
the numbers of numParams.
In python the code looks s.th. like this

self.output_names = (c_char_p * self.number_outputs)()

Do you know that is the equivalent in D?

Kind regards
André


More information about the Digitalmars-d-learn mailing list