@@ -25,36 +25,36 @@ called with a non-bytes parameter.
2525.. c :function :: int PyBytes_Check (PyObject *o)
2626
2727 Return true if the object *o * is a bytes object or an instance of a subtype
28- of the bytes type. This function always succeeds.
28+ of the bytes type. This function always succeeds.
2929
3030
3131.. c :function :: int PyBytes_CheckExact (PyObject *o)
3232
3333 Return true if the object *o * is a bytes object, but not an instance of a
34- subtype of the bytes type. This function always succeeds.
34+ subtype of the bytes type. This function always succeeds.
3535
3636
3737.. c :function :: PyObject* PyBytes_FromString (const char *v)
3838
3939 Return a new bytes object with a copy of the string *v * as value on success,
40- and ``NULL `` on failure. The parameter *v * must not be ``NULL ``; it will not be
40+ and ``NULL `` on failure. The parameter *v * must not be ``NULL ``; it will not be
4141 checked.
4242
4343
4444.. c :function :: PyObject* PyBytes_FromStringAndSize (const char *v, Py_ssize_t len)
4545
4646 Return a new bytes object with a copy of the string *v * as value and length
47- *len * on success, and ``NULL `` on failure. If *v * is ``NULL ``, the contents of
47+ *len * on success, and ``NULL `` on failure. If *v * is ``NULL ``, the contents of
4848 the bytes object are uninitialized.
4949
5050
5151.. c :function :: PyObject* PyBytes_FromFormat (const char *format, ...)
5252
5353 Take a C :c:func: `printf `\ -style *format * string and a variable number of
5454 arguments, calculate the size of the resulting Python bytes object and return
55- a bytes object with the values formatted into it. The variable arguments
55+ a bytes object with the values formatted into it. The variable arguments
5656 must be C types and must correspond exactly to the format characters in the
57- *format * string. The following format characters are allowed:
57+ *format * string. The following format characters are allowed:
5858
5959 .. % XXX: This should be exactly the same as the table in PyErr_Format.
6060 .. % One should just refer to the other.
@@ -136,12 +136,12 @@ called with a non-bytes parameter.
136136
137137.. c :function :: char * PyBytes_AsString (PyObject *o)
138138
139- Return a pointer to the contents of *o *. The pointer
139+ Return a pointer to the contents of *o *. The pointer
140140 refers to the internal buffer of *o *, which consists of ``len(o) + 1 ``
141- bytes. The last byte in the buffer is always null, regardless of
142- whether there are any other null bytes. The data must not be
141+ bytes. The last byte in the buffer is always null, regardless of
142+ whether there are any other null bytes. The data must not be
143143 modified in any way, unless the object was just created using
144- ``PyBytes_FromStringAndSize(NULL, size) ``. It must not be deallocated. If
144+ ``PyBytes_FromStringAndSize(NULL, size) ``. It must not be deallocated. If
145145 *o * is not a bytes object at all, :c:func: `PyBytes_AsString ` returns ``NULL ``
146146 and raises :exc: `TypeError `.
147147
@@ -162,9 +162,9 @@ called with a non-bytes parameter.
162162 if it does, the function returns ``-1 `` and a :exc: `ValueError ` is raised.
163163
164164 The buffer refers to an internal buffer of *obj *, which includes an
165- additional null byte at the end (not counted in *length *). The data
165+ additional null byte at the end (not counted in *length *). The data
166166 must not be modified in any way, unless the object was just created using
167- ``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If
167+ ``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If
168168 *obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize`
169169 returns ``-1`` and raises :exc:`TypeError`.
170170
@@ -176,16 +176,16 @@ called with a non-bytes parameter.
176176.. c:function:: void PyBytes_Concat(PyObject **bytes, PyObject *newpart)
177177
178178 Create a new bytes object in *\* bytes * containing the contents of *newpart *
179- appended to *bytes *; the caller will own the new reference. The reference to
180- the old value of *bytes * will be stolen. If the new object cannot be
179+ appended to *bytes *; the caller will own the new reference. The reference to
180+ the old value of *bytes * will be stolen. If the new object cannot be
181181 created, the old reference to *bytes * will still be discarded and the value
182182 of *\* bytes * will be set to ``NULL ``; the appropriate exception will be set.
183183
184184
185185.. c :function :: void PyBytes_ConcatAndDel (PyObject **bytes, PyObject *newpart)
186186
187187 Create a new bytes object in *\* bytes * containing the contents of *newpart *
188- appended to *bytes *. This version releases the :term: `strong reference `
188+ appended to *bytes *. This version releases the :term: `strong reference `
189189 to *newpart * (i.e. decrements its reference count).
190190
191191
@@ -214,8 +214,8 @@ called with a non-bytes parameter.
214214 one, only more efficiently.
215215 Pass the address of an
216216 existing bytes object as an lvalue (it may be written into), and the new size
217- desired. On success, *\*bytes* holds the resized bytes object and ``0`` is
218- returned; the address in *\*bytes* may differ from its input value. If the
217+ desired. On success, *\*bytes* holds the resized bytes object and ``0`` is
218+ returned; the address in *\*bytes* may differ from its input value. If the
219219 reallocation fails, the original bytes object at *\* bytes * is deallocated,
220220 *\* bytes * is set to ``NULL ``, :exc: `MemoryError ` is set, and ``-1 `` is
221221 returned.
0 commit comments