mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
There was problems with most non basic types... Added an option to premake so we can do: premake --target gnu --no-boehm to disable the Boehm GC.
14 lines
240 B
D
14 lines
240 B
D
module vararg5;
|
|
import tango.core.Vararg;
|
|
extern(C) int printf(char*, ...);
|
|
void func(...)
|
|
{
|
|
char[] str = va_arg!(char[])(_argptr);
|
|
{printf("%.*s\n", str.length, str.ptr);}
|
|
}
|
|
void main()
|
|
{
|
|
char[] str = "hello";
|
|
func(str);
|
|
}
|