8000 Address reviews · python/cpython@d0cdbd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d0cdbd1

Browse files
committed
Address reviews
1 parent c84f314 commit d0cdbd1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/c-api/unicode.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ APIs:
349349
* On success, fill *view*, and return ``0``.
350350
* On error, set an exception and return ``-1``.
351351
352-
The export must be released by :c:func:`PyBuffer_Release`.
352+
The *view* buffer must be released by :c:func:`PyBuffer_Release`.
353353
The contents of the buffer are valid until they are released.
354354
355355
The buffer is read-only and must not be modified.
@@ -372,7 +372,8 @@ APIs:
372372
373373
*requested_formats* can be a single format or a bitwise combination of the
374374
formats in the table above.
375-
On success, *\*format* will be set to a single one of the requested flags.
375+
To determine the format that was selected for output, call
376+
:c:func:`PyUnicode_GetBufferFormat`.
376377
377378
Note that future versions of Python may introduce additional formats.
378379
@@ -383,7 +384,7 @@ APIs:
383384
384385
Get the format of the buffer *view*.
385386
386-
* On success, set *\*result* to the corresponding `PyUnicode_FORMAT_*` value
387+
* On success, set *\*format* to the corresponding ``PyUnicode_FORMAT_*`` value
387388
and return ``0``.
388389
* On error, set an exception and return ``-1``.
389390
@@ -394,7 +395,7 @@ APIs:
394395
395396
.. c:function:: PyObject* PyUnicode_Import(const void *data, Py_ssize_t nbytes, uint32_t format)
396397
397-
Create a string object from a buffer in an “export format.
398+
Create a Unicode string object from a buffer in a supported format.
398399
399400
* Return a reference to a new string object on success.
400401
* Set an exception and return ``NULL`` on error.

0 commit comments

Comments
 (0)
0