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-46315: Use fopencookie() to avoid dup() in _PyTokenizer_FindEncodingFilename by tiran · Pull Request #32033 · python/cpython Conversation
|
|
🤖 New build scheduled with the buildbot fleet by @pablogsal for commit 6be12fc 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // cookie is just the fd | ||
| borrowed b; | ||
| b.fd = fd; | ||
| return fopencookie(b.cookie, "r", cookie_io); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
fopencookie is a non-standard GNU extension. Is this available in all platforms targetted by web assembly? Does this need a configure check?
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.
I had a configure check in my first version of the patch. I got rid of it because it makes no sense. Both WASI and Emscripten use musl libc as upper half of libc and it always provides fdopencookie.
I wish their was a more elegant way to solve the problem. _PyTokenizer_FindEncodingFilename uses a FILE pointer instead of a file descriptor.
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.
Ugh, I am honestly not very happy with the amount of extra code, but I understand why is needed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The failing tests on macOS ARM64 and FreeBSD are unrelated to my changes. |
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.
The code looks good to me, but I had no way to test it myself, so I am not formally approving. Feel free to land if you want though
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I can shorten the code. |
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.