Wrapping variadic functions for use in Swift
As I noted in my post about getting libcurl working with Swift, curl_easy_setopt() is a variadic function which means that Swift will not import it. If you try to use it you get this error: error: 'curl_easy_setopt' is unavailable: Variadic function is unavailable curl_easy_setopt(handle, CURLOPT_VERBOSE, true) ^~~~~~~~~~~~~~~~ CCurl.curl_easy_setopt:2:13: note: 'curl_easy_setopt' has been explicitly marked unavailable here public func curl_easy_setopt(curl: UnsafeMutablePointer, _ option: CURLoption, _ varargs: Any…) -> CURLcode ^ It's mildly annoying as curl_easy_setopt only… continue reading.