mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-132983: Make _zstd C code PEP 7 compliant (GH-134605) (#134609)
gh-132983: Make _zstd C code PEP 7 compliant (GH-134605)
Make _zstd C code PEP 7 compliant
(cherry picked from commit 973b8f69d3)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
This commit is contained in:
parent
f301af627e
commit
38a38243b7
6 changed files with 133 additions and 105 deletions
|
|
@ -19,7 +19,8 @@ _OutputBuffer_InitAndGrow(_BlocksOutputBuffer *buffer, ZSTD_outBuffer *ob,
|
|||
/* Ensure .list was set to NULL */
|
||||
assert(buffer->list == NULL);
|
||||
|
||||
Py_ssize_t res = _BlocksOutputBuffer_InitAndGrow(buffer, max_length, &ob->dst);
|
||||
Py_ssize_t res = _BlocksOutputBuffer_InitAndGrow(buffer, max_length,
|
||||
&ob->dst);
|
||||
if (res < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -34,8 +35,7 @@ _OutputBuffer_InitAndGrow(_BlocksOutputBuffer *buffer, ZSTD_outBuffer *ob,
|
|||
Return -1 on failure */
|
||||
static inline int
|
||||
_OutputBuffer_InitWithSize(_BlocksOutputBuffer *buffer, ZSTD_outBuffer *ob,
|
||||
Py_ssize_t max_length,
|
||||
Py_ssize_t init_size)
|
||||
Py_ssize_t max_length, Py_ssize_t init_size)
|
||||
{
|
||||
Py_ssize_t block_size;
|
||||
|
||||
|
|
@ -50,7 +50,8 @@ _OutputBuffer_InitWithSize(_BlocksOutputBuffer *buffer, ZSTD_outBuffer *ob,
|
|||
block_size = init_size;
|
||||
}
|
||||
|
||||
Py_ssize_t res = _BlocksOutputBuffer_InitWithSize(buffer, block_size, &ob->dst);
|
||||
Py_ssize_t res = _BlocksOutputBuffer_InitWithSize(buffer, block_size,
|
||||
&ob->dst);
|
||||
if (res < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue