mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
varargs fixes
This commit is contained in:
parent
0ebd306d93
commit
1f42567339
2 changed files with 21 additions and 3 deletions
|
@ -21,9 +21,14 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
[CRepr]
|
||||
struct VarArgs
|
||||
{
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
void* mVAList;
|
||||
#else
|
||||
int[3] mVAList; // Conservative size for va_list
|
||||
#endif
|
||||
|
||||
[Intrinsic("va_start")]
|
||||
static extern void Start(void* vaList);
|
||||
|
@ -51,6 +56,15 @@ namespace System
|
|||
Arg(&mVAList, &val, (.)typeof(T).TypeId);
|
||||
val
|
||||
}
|
||||
|
||||
public void* ToVAList() mut
|
||||
{
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
return mVAList;
|
||||
#else
|
||||
return &mVAList;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
[AlwaysInclude]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue