The error argument for PyNumber_AsSsize_t is only used for
overflow handling (that's why it's always either IndexError or OverflowError
in the core). The TypeError for non-integers (like 1.0) is raised separately
(even if you set the error argument to NULL to request clipping).