[swift-corelibs-dev] CChar vs Int8

Luke Howard lukeh at padl.com
Sat Jan 2 22:28:23 CST 2016


Many Foundation APIs use Int8 instead of CChar when representing C strings, e.g.:
var UTF8String: UnsafePointer <https://developer.apple.com/library/mac/documentation/Swift/Reference/Swift_UnsafePointer_Structure/index.html#//apple_ref/swift/struct/s:VSs13UnsafePointer><Int8 <https://developer.apple.com/library/mac/documentation/Swift/Reference/Swift_Int8_Structure/index.html#//apple_ref/swift/struct/s:VSs4Int8>> { get }
I don’t know if/when Swift will be ported to a platform where the character type is unsigned but perhaps it would be good to update these to take CChar instead?

— Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20160103/cce366f1/attachment.html>


More information about the swift-corelibs-dev mailing list