Mercurial > projects > ldc
annotate lphobos/std/stdarg.d @ 984:4c0df37d0421
Removing ldc.conf. (IMPORTANT: run 'cmake .' after pull)
Added it to .hgignore.
This gets rid of spurious differences caused by CMake regenerating it differently.
Just run 'cmake .' to get it back in your local checkout.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Thu, 19 Feb 2009 13:50:05 +0100 |
parents | eef8ac26c66c |
children |
rev | line source |
---|---|
65 | 1 |
2 /* | |
3 * Placed in public domain. | |
4 * Written by Hauke Duden and Walter Bright | |
5 */ | |
6 | |
7 /* This is for use with variable argument lists with extern(D) linkage. */ | |
8 | |
664
eef8ac26c66c
Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents:
131
diff
changeset
|
9 /* Modified for LDC (LLVM D Compiler) by Tomas Lindquist Olsen, 2007 */ |
131 | 10 |
65 | 11 module std.stdarg; |
12 | |
13 alias void* va_list; | |
14 | |
131 | 15 T va_arg(T)(ref va_list vp) |
65 | 16 { |
131 | 17 size_t size = T.sizeof > size_t.sizeof ? size_t.sizeof : T.sizeof; |
18 va_list vptmp = cast(va_list)((cast(size_t)vp + size - 1) & ~(size - 1)); | |
70
fb265a6efea1
[svn r74] Fixed passing types with different alignment to D-style variadic functions.
lindquist
parents:
65
diff
changeset
|
19 vp = vptmp + T.sizeof; |
65 | 20 return *cast(T*)vptmp; |
21 } |