Bindings to C library.
Jeremie Pelletier
jeremiep at gmail.com
Tue Sep 22 04:25:04 PDT 2009
nikita wrote:
> A-argh! Sorry, it's my inattention :)
> All was very simple. Interface to c library:
> extern(C)
> char** enca_get_languages(uint*);
>
> and in main module (i'm using tango.stdc.stringz):
> uint nb_lang;
> char** row = enca_get_languages(&nb_lang);
>
> for (uint y = 0; y < nb_lang; y++) {
> Stdout(fromStringz(row[y])).newline();
> }
If you are using D2, it should be:
extern(C) const(char**) enca_get_languages(size_t*);
More information about the Digitalmars-d-learn
mailing list