irace/BRYDescriptionBuilder — pull request #4 by paulrehkugler (2014-03-06 01:57:38+00:00)
Title: Added proper string format tokens for 32/64 bit

I suppose there should eventually be a test to make sure my assumptions about the typedefs don't change in different SDK versions. Would something like the following be reliable?

- (void) testTypedefAssumptions {
#if defined(__LP64__) && __LP64__
NSAssert(sizeof(NSInteger) == sizeof(long), @"NSInteger is not a long.");
NSAssert(sizeof(NSUInteger) == sizeof(unsigned long), @"NSUInteger is not an unsigned long.");
NSAssert(sizeof(CGFloat) == sizeof(double), @"CGFloat is not a double.");
#else
NSAssert(sizeof(NSInteger) == sizeof(int), @"NSInteger is not an int.");
NSAssert(sizeof(NSUInteger) == sizeof(unsigned int), @"NSUInteger is not an unsigned int.");
NSAssert(sizeof(CGFloat) == sizeof(float), @"CGFloat is not a float.");
#endif
}