Convert string[] to char**
Bruce Smith
b.e.smith at computer.org
Tue Jun 4 00:18:51 PDT 2013
Hello
/[I'll prefix this question by stating that I am not a strong C
programmer; my long experience is in a wide range of languages other
than C//]/
I wish to call some functions in a complex C library from D. Since this
a large & complex library, I've wrapped a bunch of the functions using
SWIG (swig -d -d2 ...). One of the C functions has a signature like:
void foo(const char * const *keys);
SWIG has given me a D function signature like:
void foo(char** keys);
In my D program it is natural to represent some keys as an array of
strings, for example:
string[] mykeys;
How should I convert mykeys from string[] to char** so that I can call
foo with mykeys as the actual parameter?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130604/1d0daeab/attachment.html>
More information about the Digitalmars-d
mailing list