Skip to content

Commit d53ab7a

Browse files
committed
Inline small implementation function
1 parent 1915b52 commit d53ab7a

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

src/isal/igzip_libmodule.c

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -234,18 +234,6 @@ decompress(IgzipDecompressor *self, uint8_t *data, size_t len, Py_ssize_t max_le
234234
return NULL;
235235
}
236236

237-
static PyObject *
238-
igzip_lib_IgzipDecompressor_decompress_impl(IgzipDecompressor *self, Py_buffer *data,
239-
Py_ssize_t max_length)
240-
{
241-
PyObject *result = NULL;
242-
if (self->eof)
243-
PyErr_SetString(PyExc_EOFError, "End of stream already reached");
244-
else
245-
result = decompress(self, data->buf, data->len, max_length);
246-
return result;
247-
}
248-
249237
PyDoc_STRVAR(igzip_lib_compress__doc__,
250238
"compress($module, data, /, level=ISAL_DEFAULT_COMPRESSION, flag=COMP_DEFLATE,\n"
251239
" mem_level=MEM_LEVEL_DEFAULT, hist_bits=MAX_HIST_BITS)\n"
@@ -365,10 +353,13 @@ igzip_lib_IgzipDecompressor_decompress(IgzipDecompressor *self, PyObject *args,
365353
args, kwargs, format, keywords, &data, &max_length)) {
366354
return NULL;
367355
}
368-
369-
PyObject *return_value = igzip_lib_IgzipDecompressor_decompress_impl(self, &data, max_length);
356+
PyObject *result = NULL;
357+
if (self->eof)
358+
PyErr_SetString(PyExc_EOFError, "End of stream already reached");
359+
else
360+
result = decompress(self, data.buf, data.len, max_length);
370361
PyBuffer_Release(&data);
371-
return return_value;
362+
return result;
372363
}
373364

374365
PyDoc_STRVAR(igzip_lib_IgzipDecompressor___init____doc__,

0 commit comments

Comments
 (0)