From 49deafe227503c32748eda88e8659b84e8e00311 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Fri, 26 Oct 2007 15:14:51 +0200 Subject: [PATCH] [svn r69] forgot std.stdarg --- gen/typinf.c | 5 +---- lphobos/std/stdarg.d | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 lphobos/std/stdarg.d diff --git a/gen/typinf.c b/gen/typinf.c index 0580bbb1..1798fa3d 100644 --- a/gen/typinf.c +++ b/gen/typinf.c @@ -242,8 +242,8 @@ void TypeInfoDeclaration::toObjFile() Logger::println("TypeInfoDeclaration::toObjFile()"); LOG_SCOPE; - Logger::println("type = '%s'", tinfo->toChars()); + Logger::println("type = '%s'", tinfo->toChars()); Logger::println("typeinfo mangle: %s", mangle()); // this is a declaration of a builtin __initZ var @@ -255,9 +255,6 @@ void TypeInfoDeclaration::toObjFile() // custom typedef else { toDt(NULL); - // this is a specialized typeinfo - //std::vector stypes; - //stypes.push_back( } } diff --git a/lphobos/std/stdarg.d b/lphobos/std/stdarg.d new file mode 100644 index 00000000..9d31ab5e --- /dev/null +++ b/lphobos/std/stdarg.d @@ -0,0 +1,18 @@ + +/* + * 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; + +T va_arg(T)(inout va_list vp) +{ + va_list vptmp = vp; + vp += T.sizeof; + return *cast(T*)vptmp; +}