首页 > 代码库 > For 32-bit BOOL is a signed char, whereas under 64-bit it is a bool.
For 32-bit BOOL is a signed char, whereas under 64-bit it is a bool.
https://stackoverflow.com/questions/31267325/bool-with-64-bit-on-ios/31270249#31270249
Definition of BOOL from objc.h
:
/// Type to represent a boolean value.
#if (TARGET_OS_IPHONE && __LP64__) || TARGET_OS_WATCH
#define OBJC_BOOL_IS_BOOL 1
typedef bool BOOL;
#else
#define OBJC_BOOL_IS_CHAR 1
typedef signed char BOOL;
// BOOL is explicitly signed so @encode(BOOL) == "c" rather than "C"
// even if -funsigned-char is used.
#endif
For 32-bit BOOL is a signed char, whereas under 64-bit it is a bool.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。