Skip to content

bpo-37348 : add _PyUnicode_FROM_ASCII#14264

Closed
methane wants to merge 4 commits into
python:masterfrom
methane:fromascii
Closed

bpo-37348 : add _PyUnicode_FROM_ASCII#14264
methane wants to merge 4 commits into
python:masterfrom
methane:fromascii

Conversation

@methane

@methane methane commented Jun 20, 2019

Copy link
Copy Markdown
Member

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

skrah commented Jun 20, 2019

Copy link
Copy Markdown
Contributor

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

methane commented Jun 20, 2019

Copy link
Copy Markdown
Member Author

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