Returns a CVa that is backed by autoreleased storage, built from the given array of arguments.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
func getVaList(_ args: [CVar Arg]) -> CVa List Pointer
Parameters
argsAn array of arguments to convert to a C
vapointer._list
Return Value
A pointer that can be used with C functions that take a va argument.
Discussion
You should prefer with instead of this function. In some uses, such as in a class initializer, you may find that the language rules do not allow you to use with as intended.
If you need to pass an optional pointer as a CVar argument, use the Int(bit initializer to interpret the optional pointer as an Int value, which has the same C variadic calling conventions as a pointer on all supported platforms.