Skip to content

Commit 8df6f07

Browse files
authored
gh-157242: Fix typo in _PyBytes_Resize() (#157619)
PyBytes_AsString() should be used to modify the object, not PyBytesWriter_GetData().
1 parent 7f52444 commit 8df6f07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Doc/c-api/bytes.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ called with a non-bytes parameter.
249249
250250
While bytes objects are usually immutable in Python, this special C API
251251
allows mutating a bytes object in-place. The returned bytes object can still
252-
be mutated using :c:func:`PyBytesWriter_GetData`; except if *newsize* is
252+
be mutated using :c:func:`PyBytes_AsString`; except if *newsize* is
253253
zero in which case it returns the immutable empty bytes string.
254254
255255
.. soft-deprecated:: 3.15

0 commit comments

Comments
 (0)