Archive for April, 2018

Formatting CVaListPointer

Monday, April 9th, 2018

So you’re using libtiff in Swift, and need to implement the TIFFErrorHandler. Or, for whatever reason, you have a CVaListPointer (the args parameter, below) and a format string, and you want to format. Here’s how: let errorHandler:TIFFErrorHandler = { (moduleNamePtr, formatPtr, args) in guard let formatPtr = formatPtr else { // No format string – […]