Use ptrdiff_t instead of int.