diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-18 19:53:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-18 19:53:15 (GMT) |
commit | 009b811d678f36cf63be4fe26f3fbaa38aa0078e (patch) | |
tree | a24ddae0e641ac1bce8a5b33526bd05bd04d264c /Modules/_lzmamodule.c | |
parent | 6c32585f677b71eb1206852d24f077f602780c85 (diff) | |
download | cpython-009b811d678f36cf63be4fe26f3fbaa38aa0078e.zip cpython-009b811d678f36cf63be4fe26f3fbaa38aa0078e.tar.gz cpython-009b811d678f36cf63be4fe26f3fbaa38aa0078e.tar.bz2 |
Removed unintentional trailing spaces in non-external and non-generated C files.
Diffstat (limited to 'Modules/_lzmamodule.c')
-rw-r--r-- | Modules/_lzmamodule.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c index bae7df6..9abdf63 100644 --- a/Modules/_lzmamodule.c +++ b/Modules/_lzmamodule.c @@ -149,10 +149,10 @@ grow_buffer(PyObject **buf, Py_ssize_t max_length) { Py_ssize_t size = PyBytes_GET_SIZE(*buf); Py_ssize_t newsize = size + (size >> 3) + 6; - + if (max_length > 0 && newsize > max_length) newsize = max_length; - + return _PyBytes_Resize(buf, newsize); } @@ -906,7 +906,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length) Py_ssize_t data_size = 0; PyObject *result; lzma_stream *lzs = &d->lzs; - + if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE) result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); else @@ -916,7 +916,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length) lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result); lzs->avail_out = PyBytes_GET_SIZE(result); - + for (;;) { lzma_ret lzret; @@ -947,7 +947,7 @@ decompress_buf(Decompressor *d, Py_ssize_t max_length) goto error; return result; - + error: Py_XDECREF(result); return NULL; @@ -959,11 +959,11 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length) char input_buffer_in_use; PyObject *result; lzma_stream *lzs = &d->lzs; - + /* Prepend unconsumed input if necessary */ if (lzs->next_in != NULL) { size_t avail_now, avail_total; - + /* Number of bytes we can append to input buffer */ avail_now = (d->input_buffer + d->input_buffer_size) - (lzs->next_in + lzs->avail_in); @@ -987,7 +987,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length) } d->input_buffer = tmp; d->input_buffer_size = new_size; - + lzs->next_in = d->input_buffer + offset; } else if (avail_now < len) { @@ -1054,7 +1054,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length) lzs->next_in = d->input_buffer; } } - + return result; error: @@ -1247,7 +1247,7 @@ Decompressor_dealloc(Decompressor *self) { if(self->input_buffer != NULL) PyMem_Free(self->input_buffer); - + lzma_end(&self->lzs); Py_CLEAR(self->unused_data); #ifdef WITH_THREAD |