withNumber(unsigned long long, unsigned int)
Creates and initializes an instance of OSNumber with an integer value.
Declaration
static OSNumber * withNumber(
unsigned long longvalue,
unsigned intnumberOfBits);Parameters
- value:
The numeric integer value for the OSNumber to store.
- numberOfBits:
The number of bits to limit storage to.
Return Value
An instance of OSNumber with a reference count of 1; NULL on failure.
Overview
value is masked to the provided numberOfBits when the OSNumber object is initialized.
You can change the value of an OSNumber later using setValue and addValue, but you can't change the bit size.