Skip to content

bpo-37348 : add _PyUnicode_FROM_ASCII #14264

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

Closed
wants to merge 4 commits into from
Closed

Conversation

methane
Copy link
Member

@methane methane commented Jun 20, 2019

It is a convenient wrapper for _PyUnicode_FromASCII().
It can be used like PyUnicode_FromString, without a length of the string.

https://bugs.python.org/issue37348

@methane methane changed the title add _PyUnicode_FROM_ASCII bpo-37348 : add _PyUnicode_FROM_ASCII Jun 20, 2019
@skrah
Copy link
Contributor

skrah commented Jun 20, 2019

I wonder if we need a new macro throughout the code base. In the case of _decimal, the paths are not performance sensitive, so I'd appreciate if you take it out.

If this really saves a measurable amount of time, we should have an external PyUnicode_FromASCIIString(), so other people can use it, too.

@methane
Copy link
Member Author

methane commented Jun 20, 2019

In the case of _decimal, the paths are not performance sensitive, so I'd appreciate if you take it out.

OK, I reverted it.

@methane methane closed this Jun 21, 2019
@methane methane deleted the fromascii branch June 25, 2019 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants