I have an objective C function that gives me a
UnsafePointer<UInt8>/UnsafePointer<CUnsignedChar>.
However I need this data as a
UnsafePointer<Int8>
unfortunately the function I require doesn't take
UnsafePointer<UInt8>.
I have an objective C function that gives me a
UnsafePointer<UInt8>/UnsafePointer<CUnsignedChar>.
However I need this data as a
UnsafePointer<Int8>
unfortunately the function I require doesn't take
UnsafePointer<UInt8>.
In your case an "unsafe bit cast" would be the easiest solution:
Another option is "memory rebinding":