[swift-users] How to malloc in Swift 3

Gerriet M. Denkmann g at mdenkmann.de
Fri Sep 23 03:47:24 CDT 2016


This used to work in Swift 2.2:

var bitfield: UnsafeMutablePointer<UInt8>?
bitfield = UnsafeMutablePointer<UInt8>( malloc( 888 ) )

How is this written in Swift 3.0?

Gerriet.



More information about the swift-users mailing list