@@ -152,10 +152,26 @@ if (idx >= _count) @throw [OFOutOfRangeException exception]; return _items + idx * _itemSize; } + +- (void *)mutableFirstItem +{ + if (_items == NULL || _count == 0) + return NULL; + + return _items; +} + +- (void *)mutableLastItem +{ + if (_items == NULL || _count == 0) + return NULL; + + return _items + (_count - 1) * _itemSize; +} - (OFData *)subdataWithRange: (of_range_t)range { if (range.length > SIZE_MAX - range.location || range.location + range.length > _count)