mirror of
https://github.com/python/cpython.git
synced 2025-12-10 02:50:09 +00:00
gh-130790: Remove references about unicode's readiness from comments (#130801)
This commit is contained in:
parent
8a64a62002
commit
3a7f17c7e2
11 changed files with 9 additions and 28 deletions
|
|
@ -358,7 +358,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *myself,
|
|||
out = PyUnicode_DATA(modified);
|
||||
PyUnicode_WRITE(kind, out, 0, '\r');
|
||||
memcpy(out + kind, PyUnicode_DATA(output), kind * output_len);
|
||||
Py_SETREF(output, modified); /* output remains ready */
|
||||
Py_SETREF(output, modified);
|
||||
self->pendingcr = 0;
|
||||
output_len++;
|
||||
}
|
||||
|
|
@ -1818,7 +1818,6 @@ textiowrapper_get_decoded_chars(textio *self, Py_ssize_t n)
|
|||
if (self->decoded_chars == NULL)
|
||||
return Py_GetConstant(Py_CONSTANT_EMPTY_STR);
|
||||
|
||||
/* decoded_chars is guaranteed to be "ready". */
|
||||
avail = (PyUnicode_GET_LENGTH(self->decoded_chars)
|
||||
- self->decoded_chars_used);
|
||||
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ nfd_nfkd(PyObject *self, PyObject *input, int k)
|
|||
PyMem_Free(output);
|
||||
if (!result)
|
||||
return NULL;
|
||||
/* result is guaranteed to be ready, as it is compact. */
|
||||
|
||||
kind = PyUnicode_KIND(result);
|
||||
data = PyUnicode_DATA(result);
|
||||
|
||||
|
|
@ -655,7 +655,7 @@ nfc_nfkc(PyObject *self, PyObject *input, int k)
|
|||
result = nfd_nfkd(self, input, k);
|
||||
if (!result)
|
||||
return NULL;
|
||||
/* result will be "ready". */
|
||||
|
||||
kind = PyUnicode_KIND(result);
|
||||
data = PyUnicode_DATA(result);
|
||||
len = PyUnicode_GET_LENGTH(result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue