Using int instead of ptrdiff_t for indexes.