Wrapping c variadic functions
simendsjo
simendsjo at gmail.com
Thu Feb 23 02:35:32 PST 2012
Say i have a c function (didn't include first format argument for
simplicity)
void print(...);
I wrap it up:
extern(System) void print(...);
And then I try to wrap it up in some safer D way:
void print(Args...)(Args args)
{
print(args); // only the first argument is printed
}
void print(...)
{
print(_argptr); // no go either
}
How am I supposed to do this? http://dlang.org/function.html#variadic
doesn't make my any smarter.
More information about the Digitalmars-d-learn
mailing list