[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:
Miss Islington (bot) 2025-05-24 04:28:40 +02:00 committed by GitHub
parent f301af627e
commit 38a38243b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 133 additions and 105 deletions

View file

@ -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;
}