Stop duplicating code and handle slice indices consistently and correctly
wrt to ssize_t.
4 files changed