Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src_c/rect_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1994,11 +1994,16 @@ RectExport_containsSeq(RectObject *self, PyObject *arg)
return coord == self->r.x || coord == self->r.y ||
coord == self->r.w || coord == self->r.h;
}

int ret = RectExport_contains_internal(self, (PyObject *const *)&arg, 1);
if (ret < 0) {
PyErr_SetString(PyExc_TypeError, "'in <" ObjectName
">' requires rect style object"
" or int as left operand");
const char *operand_type =
pgFRect_Check((PyObject *)self) ? "float" : "int";

PyErr_Format(
PyExc_TypeError,
"'in %s' requires rect style object or %s as left operand",
ObjectName, operand_type);
}
return ret;
}
Expand Down
Loading