Mercurial > projects > ldc
diff tests/testincludes/std/stdarg.d @ 1595:628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Updated the runtest script to build libtangobos-partial.a if it hasn't already been built.
Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 08 Nov 2009 16:16:17 +0000 |
parents | |
children | 42fc0d955a0d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/testincludes/std/stdarg.d Sun Nov 08 16:16:17 2009 +0000 @@ -0,0 +1,22 @@ + +/* + * Placed in public domain. + * Written by Hauke Duden and Walter Bright + */ + +/* This is for use with variable argument lists with extern(D) linkage. */ + +module std.stdarg; + +alias void* va_list; + +template va_arg(T) +{ + T va_arg(inout va_list _argptr) + { + T arg = *cast(T*)_argptr; + _argptr = _argptr + ((T.sizeof + int.sizeof - 1) & ~(int.sizeof - 1)); + return arg; + } +} +