| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
%ls is not applicable here.
One possible solutions is to use %S on Windows and %s on Linux (it should be tested). Or maybe there is a portable way.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
There was a problem hiding this comment.
Following Serhiy's suggestion, maybe this is better:
Sorry, something went wrong.
|
You can also use Py_DecodeLocale() as in other tests. |
Sorry, something went wrong.
| // bpo-45020: Test that -X "frozen_modules" works. | ||
| const char *envvar = getenv("TESTFROZEN"); | ||
| return check_use_frozen_modules(envvar); | ||
| wchar_t *frozen = Py_DecodeLocale(envvar, NULL); |
There was a problem hiding this comment.
If you are going to use Py_DecodeLocale(), you need to check its result for failure, and free the dynamic allocated memory after use. You should also add a special case for getenv() returning NULL.
@Fidget-Spinner's suggestion is much simpler.
Sorry, something went wrong.
This reverts commit c67be03.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
Thank you @serhiy-storchaka and @Fidget-Spinner for your help! I am coming from Rust background and C is very hard for me! (no borrow checker 😬, you have to remember to deallocate memory!) But, I will do my best to get used to it 🙂 |
Sorry, something went wrong.
|
@sobolevn glad to help. Your comment also reminded me I should seriously try out Rust one day :). I still suck at it. |
Sorry, something went wrong.
|
@Fidget-Spinner you can take a look at RustPython project: https://github.com/RustPython/RustPython |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Refs #29307
https://bugs.python.org/issue45666