@@ -34,10 +34,11 @@ OF_NUMBER_SSIZE, OF_NUMBER_INTMAX, OF_NUMBER_UINTMAX, OF_NUMBER_PTRDIFF, OF_NUMBER_INTPTR, + OF_NUMBER_UINTPTR, OF_NUMBER_FLOAT, OF_NUMBER_DOUBLE, }; /** @@ -66,10 +67,11 @@ ssize_t ssize; intmax_t intmax; uintmax_t uintmax; ptrdiff_t ptrdiff; intptr_t intptr; + uintptr_t uintptr; float float_; double double_; } value; enum of_number_type type; } @@ -204,10 +206,16 @@ * \param intptr An intptr_t which the OFNumber should contain * \return A new autoreleased OFNumber */ + numberWithIntPtr: (intptr_t)intptr; +/** + * \param uintptr An uintptr_t which the OFNumber should contain + * \return A new autoreleased OFNumber + */ ++ numberWithUIntPtr: (uintptr_t)uintptr; + /** * \param float_ A float which the OFNumber should contain * \return A new autoreleased OFNumber */ + numberWithFloat: (float)float_; @@ -392,10 +400,18 @@ * \param intptr An intptr_t which the OFNumber should contain * \return An initialized OFNumber */ - initWithIntPtr: (intptr_t)intptr; +/** + * Initializes an already allocated OFNumber with the specified uintptr_t. + * + * \param uintptr An uintptr_t which the OFNumber should contain + * \return An initialized OFNumber + */ +- initWithUIntPtr: (uintptr_t)uintptr; + /** * Initializes an already allocated OFNumber with the specified float. * * \param float_ A float which the OFNumber should contain * \return An initialized OFNumber @@ -524,10 +540,15 @@ /** * \return The OFNumber as an intptr_t */ - (intptr_t)asIntPtr; +/** + * \return The OFNumber as an uintptr_t + */ +- (uintptr_t)asUIntPtr; + /** * \return The OFNumber as a float */ - (float)asFloat;