Removed trailing whitespace

This commit is contained in:
Andrew Murray 2016-07-01 21:27:01 +10:00
parent b69596a13d
commit ebf2121338
10 changed files with 25 additions and 25 deletions

View File

@ -38,7 +38,7 @@ Changelog (Pillow)
[AbdealiJK]
- Binary Tiff Metadata/ICC profile. #1988
[wiredfool]
[wiredfool]
- Ignore large text blocks in PNG if LOAD_TRUNCATED_IMAGES is enabled #1970
[homm]

View File

@ -417,7 +417,7 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
(it is set to 9 regardless of a value passed).
**icc_profile**
The ICC Profile to include in the saved file.
The ICC Profile to include in the saved file.
**bits (experimental)**
For ``P`` images, this option controls how many bits to store. If omitted,

View File

@ -322,7 +322,7 @@ There are 3 stages in a file decoder's lifetime:
Setup
-----
-----
The current conventions are that the decoder setup function is named
``PyImaging_[Decodername]DecoderNew`` and defined in ``decode.c``. The
@ -334,15 +334,15 @@ The setup function needs to call ``PyImaging_DecoderNew`` and at the
very least, set the ``decode`` function pointer. The fields of
interest in this object are:
**decode**
**decode**
Function pointer to the decode function, which has access to
``im``, ``state``, and the buffer of data to be added to the image.
**cleanup**
**cleanup**
Function pointer to the cleanup function, has access to ``state``.
**im**
The target image, will be set by Pillow.
**im**
The target image, will be set by Pillow.
**state**
An ImagingCodecStateInstance, will be set by Pillow. The **context**
@ -350,7 +350,7 @@ interest in this object are:
any format specific state or options.
**handles_eof**
UNDONE, set if your code handles EOF errors.
UNDONE, set if your code handles EOF errors.
**pulls_fd**
**EXPERIMENTAL** -- **WARNING**, interface may change. If set to 1,
@ -380,9 +380,9 @@ call to the decoder will include the previous unconsumed tail. The
decoder function will be called multiple times as the data is read
from the file like object.
If an error occurs, set ``state->errcode`` and return -1.
If an error occurs, set ``state->errcode`` and return -1.
Return -1 on success, without setting the errcode.
Return -1 on success, without setting the errcode.
Cleanup
-------

View File

@ -42,7 +42,7 @@ Rotation
Rotation for angles divisible by 90 degrees now always uses transposition.
This greatly improve both quality and performance in this cases.
Also, the bug with wrong image size calculation when rotating by 90 degrees
Also, the bug with wrong image size calculation when rotating by 90 degrees
was fixed.

View File

@ -463,7 +463,7 @@ polygon_generic(Imaging im, int n, Edge *e, int ink, int eofill,
}
/* Process the edge table with a scan line searching for intersections */
/* malloc check ok, using calloc */
/* malloc check ok, using calloc */
xx = calloc(edge_count * 2, sizeof(float));
if (!xx) {
free(edge_table);

View File

@ -776,7 +776,7 @@ ImagingJpeg2KDecode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes)
state->errcode = IMAGING_CODEC_BROKEN;
state->state = J2K_STATE_FAILED;
return -1;
}
}
if (state->state == J2K_STATE_DONE || state->state == J2K_STATE_FAILED)
return -1;

View File

@ -971,7 +971,7 @@ compute_palette_from_median_cut(
avg[i]=NULL;
}
for(i=0;i<3;i++) {
/* malloc check ok, using calloc */
/* malloc check ok, using calloc */
if (!(avg[i]=calloc(nPaletteEntries, sizeof(uint32_t)))) {
for(i=0;i<3;i++) {
if (avg[i]) free (avg[i]);

View File

@ -51,7 +51,7 @@ static int _heap_grow(Heap *h,int newsize) {
if (newsize > INT_MAX / sizeof(void *)){
return 0;
}
/* malloc check ok, using calloc for overflow, also checking
/* malloc check ok, using calloc for overflow, also checking
above due to memcpy below*/
newheap=calloc(newsize, sizeof(void *));
if (!newheap) return 0;
@ -144,9 +144,9 @@ Heap *ImagingQuantHeapNew(HeapCmpFunc cf) {
h->heapsize=INITIAL_SIZE;
/* malloc check ok, using calloc for overflow */
h->heap=calloc(h->heapsize, sizeof(void *));
if (!h->heap) {
free(h);
return NULL;
if (!h->heap) {
free(h);
return NULL;
}
h->heapcount=0;
h->cf=cf;

View File

@ -61,7 +61,7 @@ ImagingRankFilter(Imaging im, int size, int rank)
return (Imaging) ImagingError_ValueError("bad filter size");
/* malloc check ok, for overflow in the define below */
if (size > INT_MAX / size ||
if (size > INT_MAX / size ||
size > INT_MAX / (size * sizeof(FLOAT32))) {
return (Imaging) ImagingError_ValueError("filter size too large");
}

View File

@ -3,7 +3,7 @@
#include "../py3.h"
Py_ssize_t
Py_ssize_t
_imaging_read_pyFd(PyObject *fd, char* dest, Py_ssize_t bytes)
{
/* dest should be a buffer bytes long, returns length of read
@ -17,7 +17,7 @@ _imaging_read_pyFd(PyObject *fd, char* dest, Py_ssize_t bytes)
result = PyObject_CallMethod(fd, "read", "n", bytes);
bytes_result = PyBytes_AsStringAndSize(result, &buffer, &length);
if (bytes_result == -1) {
if (bytes_result == -1) {
goto err;
}
@ -25,18 +25,18 @@ _imaging_read_pyFd(PyObject *fd, char* dest, Py_ssize_t bytes)
goto err;
}
memcpy(dest, buffer, length);
memcpy(dest, buffer, length);
Py_DECREF(result);
return length;
err:
Py_DECREF(result);
return -1;
return -1;
}
Py_ssize_t
Py_ssize_t
_imaging_write_pyFd(PyObject *fd, char* src, Py_ssize_t bytes)
{
@ -60,7 +60,7 @@ _imaging_seek_pyFd(PyObject *fd, Py_ssize_t offset, int whence)
result = PyObject_CallMethod(fd, "seek", "ni", offset, whence);
Py_DECREF(result);
Py_DECREF(result);
return 0;
}