I'm implementing the -hash
method on a class, which is supposed to return an NSUInteger
. My implementation for it was going to be similar to this:
- (NSUInteger) hash {
return CFHash(self->cfObj);
}
Now, CFHash
returns a CFHashCode
, which is a typedef
ed unsigned long
, but as far as I'm aware an NSUInteger
is either an unsigned long
OR an unsigned int
.
What sort of problems could I run into if I'm returning an unsigned long
when the application expects an unsigned int
?