http://d.puremagic.com/issues/show_bug.cgi?id=10644
Walter Bright <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Walter Bright <[email protected]> 2013-07-19 00:51:07 PDT --- This shrinks down to: --------------------- import std.c.stdio; import std.c.stdarg; void vpr(string format, va_list args) { char[128] buffer; int count; auto f = format.ptr; auto p = buffer.ptr; auto psize = buffer.length; printf("format = %d, %s\n", cast(int)format.length, f); count = _vsnprintf(p,psize,f,args); printf("count = %d, p = %s\n", count, p); } void pr(string format, ...) { va_list ap; ap = cast(va_list)&format; ap += format.sizeof; vpr(format, ap); } void main() { pr("%d", 42); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
