func
withVaList
(
_
:
_
:)(
_
args
: [
CVarArg
],
_
body
: (
CVaListPointer
) -
>
R
) -
>
R
Auto-generated documentation for Swift. Command-click no more.
func
withVaList
(
_
:
_
:)(
_
args
: [
CVarArg
],
_
body
: (
CVaListPointer
) -
>
R
) -
>
R
Invokes the given closure with a C `va_list` argument derived from the given array of arguments.
The pointer passed as an argument to
body
is valid only during the execution ofwithVaList(_:_:)
. Do not store or return the pointer for later use.If you need to pass an optional pointer as a
CVarArg
argument, use theInt(bitPattern:)
initializer to interpret the optional pointer as anInt
value, which has the same C variadic calling conventions as a pointer on all supported platforms.