Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Conversation

@qingshi163
Copy link
Contributor

should no change need for rustpython.

src/engine.rs Outdated
Comment on lines 1001 to 1005
extern "C" {
fn tolower(c: i32) -> i32;
fn toupper(c: i32) -> i32;
fn isalnum(c: i32) -> i32;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should use the C functions here -- I don't think we really need to care about locales, and this adds an unnecessary dependency on libc. I think for the functions that take a u32, you can just use std::char::from_u32() instead of u8::try_from

@qingshi163 qingshi163 merged commit 869d80a into RustPython:master Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants