Differences From Artifact [207b43dc6a]:
- File
src/macros.h
— part of check-in
[826c9570d3]
at
2016-03-20 10:53:55
on branch trunk
— macros.h: Adjust a comment
This was not limited to Android, but also happens with newer versions of
Clang on all platforms. (user: js, size: 13613) [annotate] [blame] [check-ins using]
To Artifact [96b0f326a5]:
- File
src/macros.h
— part of check-in
[543eb96c02]
at
2016-03-28 23:43:39
on branch trunk
— Style consistency changes
Multiline preprocessor directives now always indent the continued lines
by 4 spaces. The only exception are defines that define to code blocks:
Those are still indented by a tab in order to align with the rest of the
code. (user: js, size: 13651) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
130 131 132 133 134 135 136 | # define OF_HAVE_BLOCKS #endif #if __has_feature(objc_arc) # define OF_RETURNS_RETAINED __attribute__((__ns_returns_retained__)) # define OF_RETURNS_NOT_RETAINED __attribute__((__ns_returns_not_retained__)) # define OF_RETURNS_INNER_POINTER \ | | | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | # define OF_HAVE_BLOCKS #endif #if __has_feature(objc_arc) # define OF_RETURNS_RETAINED __attribute__((__ns_returns_retained__)) # define OF_RETURNS_NOT_RETAINED __attribute__((__ns_returns_not_retained__)) # define OF_RETURNS_INNER_POINTER \ __attribute__((__objc_returns_inner_pointer__)) # define OF_CONSUMED __attribute__((__ns_consumed__)) # define OF_WEAK_UNAVAILABLE __attribute__((__objc_arc_weak_unavailable__)) #else # define OF_RETURNS_RETAINED # define OF_RETURNS_NOT_RETAINED # define OF_RETURNS_INNER_POINTER # define OF_CONSUMED |
︙ | ︙ | |||
207 208 209 210 211 212 213 | # define OF_ROOT_CLASS __attribute__((__objc_root_class__)) #else # define OF_ROOT_CLASS #endif #if __has_attribute(__objc_subclassing_restricted__) # define OF_SUBCLASSING_RESTRICTED \ | | | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | # define OF_ROOT_CLASS __attribute__((__objc_root_class__)) #else # define OF_ROOT_CLASS #endif #if __has_attribute(__objc_subclassing_restricted__) # define OF_SUBCLASSING_RESTRICTED \ __attribute__((__objc_subclassing_restricted__)) #else # define OF_SUBCLASSING_RESTRICTED #endif #ifdef __GNUC__ # ifdef OF_X86_64 # define OF_X86_64_ASM |
︙ | ︙ | |||
241 242 243 244 245 246 247 | # ifdef OF_MIPS # define OF_MIPS_ASM # endif #endif #ifdef OF_APPLE_RUNTIME # if defined(OF_X86_64) || defined(OF_X86) || defined(OF_ARM64) || \ | | | | | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | # ifdef OF_MIPS # define OF_MIPS_ASM # endif #endif #ifdef OF_APPLE_RUNTIME # if defined(OF_X86_64) || defined(OF_X86) || defined(OF_ARM64) || \ defined(OF_ARM) || defined(OF_POWERPC) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif #else # if defined(OF_ELF) # if defined(OF_X86_64) || defined(OF_X86) || \ defined(OF_ARM64) || defined(OF_ARM) || defined(OF_POWERPC) || \ defined(OF_MIPS) # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR # if __OBJFW_RUNTIME_ABI__ >= 800 # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif # endif # elif defined(OF_WINDOWS) # if defined(OF_X86_64) || defined(OF_X86) |
︙ | ︙ | |||
429 430 431 432 433 434 435 | OF_BSWAP32_NONCONST((uint32_t)(i >> 32)); #endif return i; } #ifdef __GNUC__ # define OF_BSWAP16(i) \ | | | | | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | OF_BSWAP32_NONCONST((uint32_t)(i >> 32)); #endif return i; } #ifdef __GNUC__ # define OF_BSWAP16(i) \ (__builtin_constant_p(i) ? OF_BSWAP16_CONST(i) : OF_BSWAP16_NONCONST(i)) # define OF_BSWAP32(i) \ (__builtin_constant_p(i) ? OF_BSWAP32_CONST(i) : OF_BSWAP32_NONCONST(i)) # define OF_BSWAP64(i) \ (__builtin_constant_p(i) ? OF_BSWAP64_CONST(i) : OF_BSWAP64_NONCONST(i)) #else # define OF_BSWAP16(i) OF_BSWAP16_CONST(i) # define OF_BSWAP32(i) OF_BSWAP32_CONST(i) # define OF_BSWAP64(i) OF_BSWAP64_CONST(i) #endif static OF_INLINE float OF_CONST_FUNC |
︙ | ︙ | |||
496 497 498 499 500 501 502 | #else # define OF_BSWAP_FLOAT_IF_BE(i) (i) # define OF_BSWAP_DOUBLE_IF_BE(i) (i) # define OF_BSWAP_FLOAT_IF_LE(i) OF_BSWAP_FLOAT(i) # define OF_BSWAP_DOUBLE_IF_LE(i) OF_BSWAP_DOUBLE(i) #endif | | | | | | | | | | | | 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | #else # define OF_BSWAP_FLOAT_IF_BE(i) (i) # define OF_BSWAP_DOUBLE_IF_BE(i) (i) # define OF_BSWAP_FLOAT_IF_LE(i) OF_BSWAP_FLOAT(i) # define OF_BSWAP_DOUBLE_IF_LE(i) OF_BSWAP_DOUBLE(i) #endif #define OF_ROL(value, bits) \ (((bits) % (sizeof(value) * 8)) > 0 \ ? ((value) << ((bits) % (sizeof(value) * 8))) | \ ((value) >> (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))) \ : (value)) #define OF_ROR(value, bits) \ (((bits) % (sizeof(value) * 8)) > 0 \ ? ((value) >> ((bits) % (sizeof(value) * 8))) | \ ((value) << (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))) \ : (value)) #define OF_ROUND_UP_POW2(pow2, value) (((value) + (pow2) - 1) & ~((pow2) - 1)) #define OF_HASH_INIT(hash) hash = of_hash_seed; #define OF_HASH_ADD(hash, byte) \ { \ hash += (uint8_t)(byte); \ |
︙ | ︙ |