GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-39593: Adding an unit test of ctypes by shihai1991 · Pull Request #18424 · python/cpython Conversation
|
Codecov Report
@@ Coverage Diff @@ ## master #18424 +/- ## =========================================== + Coverage 82.19% 83.19% +0.99% =========================================== Files 1957 1570 -387 Lines 589306 414436 -174870 Branches 44428 44428 =========================================== - Hits 484409 344788 -139621 + Misses 95235 59998 -35237 + Partials 9662 9650 -12
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM on my side.
@vstinner Can you please take a look?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Oops, I had a pending comment that I never submitted! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I always forget to submit too ; ) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@vstinner Hi, victor. There have a testcase of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| data = PyBytes_AS_STRING(value); | ||
| size = strlen(data); /* XXX Why not Py_SIZE(value)? */ | ||
| /* bpo-39593: XXX Why not Py_SIZE(value)? */ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't think that it's correct to add a test which indirectly specify the behavior and keep this comment which suggests to change the behavior.
I suggest to rewrite the comment to explain that we do use strlen() on purpose, rather than PyBytes_GET_SIZE() since we truncate characters after a null character on purpose. Keep the bpo number in the comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, got it. I updated the description info, do you think it's clear enough?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
|
Thanks, merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks, victor. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.