-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PixelArray raise error assigning sequence to pixel #2742
Conversation
69c7fc4
to
ad298d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it the segfault is reproducible? If so, I'd like to see a regression test
ad298d6
to
d9b14aa
Compare
Have added the regression test, thanks for pointing it out |
d9b14aa
to
90b4cb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Why not convert the static int
_pxarray_ass_item(pgPixelArrayObject *array, Py_ssize_t index, PyObject *value)
{
// Shortened code...
if (PyList_Check(value))
value = PyList_AsTuple(value); |
That is a behaviour change that deviates from the specification of the pixelarray module. According to the docs:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
fixes #2740
pygame.Color
) isn't considered a "color", but rather a pixel sequenceI am open to suggestions on how to improve the error message, can't think of something descriptive enough ATM.