-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
BUG: sscanf did not parse arguments in _tkagg.cpp #10486
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
Conversation
Does anyone know why we need to route through |
Thanks for the quick fix @mattip ! |
@QuLogic My guess is that answer is lost to the sands of time and changing it is probably a bigger change than we want to fit in for 2.2. |
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.
Yeah, this is in the blitting code, which doesn't get a lot of attention. There has always been some weirdness with the image buffer and Tk because Tk does not provide a python API for passing it around.
Is this the only place where this is done? Have we looked at what is done elsewhere for the image buffer?
src/_tkagg.cpp
Outdated
@@ -74,9 +74,9 @@ static int PyAggImagePhoto(ClientData clientdata, Tcl_Interp *interp, int | |||
return TCL_ERROR; | |||
} | |||
/* get buffer from str which is "ptr height width" */ |
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.
you'll want to update the comment
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.
fixed in 816ffba
@tacaswell sorry for not properly testing |
@ImportanceOfBeingErnest are you able to test this? |
@QuLogic If testing means building matplotlib from source, I'm affraid I can't do that currently. |
We can leave it for the next rc. |
@QuLogic : (Could you) Run the test suite, @ImportanceOfBeingErnest . (Sorry, I could not resist 🐑 . The exact reference is of course this one) |
Backport PR #10486 on branch v2.2.x
PR Summary
Fix issue #10479 which was caused by a quirk (bug?) in the way sscanf works on MSVC (windows). It seems that additional values cannot be used after "%Iu" which scans into size_t
Also added line drawing in an interactive test