In a public API, I have to specify integer arguments and return values. The API 
would be for Objective-C on iOS and Mac OS. What is the preferred type to use 
in several use cases?

For example, one API would need to use an unsigned integer whose values will be 
quite small, say in a range 0 ... 100, that is an uint16_t would be sufficient. 
(well, I would choose a uint32_t, here).


Anyway, is it preferable to use always Cocoa macros (NSInteger, NSUInteger, 
etc.) for an Objective-C API - or may/should I use int, unsigned int, or maybe 
int32_t, uint32_t, etc. when it seems more appropriate?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to