Re: Wrapping c variadic functions

2012-02-23 Thread Brad Roberts
On Thu, 23 Feb 2012, H. S. Teoh wrote: > On Thu, Feb 23, 2012 at 08:53:00PM +0100, Artur Skawina wrote: > > On 02/23/12 20:37, simendsjo wrote: > > > Hmm. Didn't my previous post make it to the newsgroup? Is visible at > > > my end. > > > > The mailing list gets stuck sometimes and does not forwa

Re: Wrapping c variadic functions

2012-02-23 Thread H. S. Teoh
On Thu, Feb 23, 2012 at 08:53:00PM +0100, Artur Skawina wrote: > On 02/23/12 20:37, simendsjo wrote: > > Hmm. Didn't my previous post make it to the newsgroup? Is visible at > > my end. > > The mailing list gets stuck sometimes and does not forward messages > for hours. Your question made it, but

Re: Wrapping c variadic functions

2012-02-23 Thread Artur Skawina
On 02/23/12 20:37, simendsjo wrote: > Hmm. Didn't my previous post make it to the newsgroup? Is visible at my end. The mailing list gets stuck sometimes and does not forward messages for hours. Your question made it, but the later post only arrived here minutes ago... artur

Re: Wrapping c variadic functions

2012-02-23 Thread simendsjo
On Thu, 23 Feb 2012 18:42:51 +0100, Artur Skawina wrote: On 02/23/12 11:35, simendsjo wrote: 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

Re: Wrapping c variadic functions

2012-02-23 Thread Artur Skawina
On 02/23/12 11:35, simendsjo wrote: > 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);

Re: Wrapping c variadic functions

2012-02-23 Thread James Miller
On 23 February 2012 23:35, simendsjo wrote: > 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

Re: Wrapping c variadic functions

2012-02-23 Thread simendsjo
On Thu, 23 Feb 2012 11:35:32 +0100, simendsjo wrote: 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(arg