www.digitalmars.com         C & C++   DMDScript  

D - How to interface with vararg C functions?

reply "Luna Kid" <lunakid neuropolis.org> writes:
This is an incomplete porting of a C interface:

extern (C) {

    char* f1 (char* fmt, va_list argp); // just use void*?
    char* f2 (char* fmt, ...);    // perhaps OK as is

}

How to correctly do it? (I haven't found any clue
in the docs. under the "Functions" heading.)

Thanks,
Lunar Szabi
Apr 17 2003
parent reply Burton Radons <loth users.sourceforge.net> writes:
Luna Kid wrote:

 This is an incomplete porting of a C interface:
 
 extern (C) {
 
     char* f1 (char* fmt, va_list argp); // just use void*?
     char* f2 (char* fmt, ...);    // perhaps OK as is
 
 }
This is how it should be done.
Apr 17 2003
parent "Luna Kid" <lunakid neuropolis.org> writes:
Thanks!

"Burton Radons" <loth users.sourceforge.net> wrote in message
news:b7o06c$1oun$1 digitaldaemon.com...
 Luna Kid wrote:

 This is an incomplete porting of a C interface:

 extern (C) {

     char* f1 (char* fmt, va_list argp); // just use void*?
     char* f2 (char* fmt, ...);    // perhaps OK as is

 }
This is how it should be done.
Apr 18 2003