Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you convert a UnsafeMutablePointer<Void> to UInt8?

The question is really simple, but somehow I don't know how to do it:

How do you convert a UnsafeMutablePointer to UInt8?

I tried converting it like this:

UInt8(theUnsafeMutablePointerVar)

but it gave me the following error: Cannot find an initializer for type 'UInt8' that accepts an argument list of type 'UnsafeMutablePointer'

like image 287
SemAllush Avatar asked Jul 25 '15 12:07

SemAllush


1 Answers

Use the pointee property in the latest Swift.

like image 168
Display Name Avatar answered Sep 22 '22 02:09

Display Name