bpo-32077: Documentation: Some Unicode object functions don't indicate whether they return a new reference#4472
Closed
lioncash wants to merge 1 commit into
Closed
bpo-32077: Documentation: Some Unicode object functions don't indicate whether they return a new reference#4472lioncash wants to merge 1 commit into
lioncash wants to merge 1 commit into
Conversation
Also adds missing functions. Makes the documentation more comprehensive in terms of indicating whether or not a function returns a new reference.
| PyUnicode_AsWideChar:int::: | ||
| PyUnicode_AsWideChar:PyObject*:*unicode:0: | ||
| PyUnicode_AsWideChar:Py_ssize_t::: | ||
| PyUnicode_AsWideChar:PyUnicodeObject*:unicode:0: |
| PyUnicode_DecodeUTF16Stateful:Py_ssize_t:size:: | ||
| PyUnicode_DecodeUTF16Stateful:const char*:errors:: | ||
| PyUnicode_DecodeUTF16Stateful:int*:byteorder:: | ||
| PyUnicode_DecodeUTF16Stateful:int*:consumed:: |
| PyUnicode_DecodeUTF8Stateful:int:size:: | ||
| PyUnicode_DecodeUTF8Stateful:Py_ssize_t:size:: | ||
| PyUnicode_DecodeUTF8Stateful:const char*:errors:: | ||
| PyUnicode_DecodeUTF8Stateful:int*:consumed:: |
|
|
||
| PyUnicode_AsUTF8AndSize:const char*::: | ||
| PyUnicode_AsUTF8AndSize:PyObject*:unicode:0: | ||
|
|
Member
There was a problem hiding this comment.
PyUnicode_AsUTF8AndSize:Py_ssize_t*:size::
| PyUnicode_EncodeRawUnicodeEscape:const Py_UNICODE*:s:: | ||
| PyUnicode_EncodeRawUnicodeEscape:int:size:: | ||
| PyUnicode_EncodeRawUnicodeEscape:Py_ssize_t:size:: | ||
| PyUnicode_EncodeRawUnicodeEscape:const char*:errors:: |
| PyUnicode_InternFromString:const char*:cp:: | ||
|
|
||
| PyUnicode_New:PyObject*::+1: | ||
| PyUnicode_New:Py_UCS4:maxchar:: |
Member
There was a problem hiding this comment.
Insert PyUnicode_New:Py_ssize_t:size::.
Contributor
Author
|
I've recreated the pull request in #11243, with the feedback addressed, as I mistakenly thought this was addressed in the past and removed my fork on github, which seems to have orphaned this pull request. I'm really sorry about that. Will close this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also adds missing functions. Makes the documentation more comprehensive in terms of indicating whether or not a function returns a new reference.
I've gone over the entries quite a few times, and I'm fairly confident I've amended most of the existing functions and added the new ones that weren't yet added. If I've happened to miss any, just say the word and I'll add them.
I've also noticed the API documentation for bytes objects is also missing entries, which I've made a local commit for, but wasn't sure if it was a good idea to intermix it in this change. I can PR it separately or include it in this one depending on whichever is preferable.
https://bugs.python.org/issue32077