I want to write some straight C code that uses some Foundation types. For now, I want to use NSInteger, NSUInteger, and NSRange; I can imagine wanting others later. Is there a header somewhere I can import that will get me these types without causing trouble in a straight C fil开发者_运维百科e?
Not Foundation, but you can use Core Foundation (<CoreFoundation/CoreFoundation.h>
or more specifically CFBase.h
), and the equivalent types CFIndex
, CFRange
, etc.
精彩评论