Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 31 additions & 62 deletions src/_imaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,7 @@
}

/* unknown type */
Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;

Check warning on line 476 in src/_imaging.c

View check run for this annotation

Codecov / codecov/patch

src/_imaging.c#L476

Added line #L476 was not covered by tests
}

static char *
Expand Down Expand Up @@ -965,8 +964,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -1214,8 +1212,7 @@
}

if (self->access == NULL) {
Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;

Check warning on line 1215 in src/_imaging.c

View check run for this annotation

Codecov / codecov/patch

src/_imaging.c#L1215

Added line #L1215 was not covered by tests
}

return getpixel(self->image, self->access, x, y);
Expand Down Expand Up @@ -1417,8 +1414,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -1691,8 +1687,7 @@

Py_XDECREF(seq);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -1752,8 +1747,7 @@
self->image->palette->size = palettesize * 8 / bits;
unpack(self->image->palette->palette, palette, self->image->palette->size);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand All @@ -1777,8 +1771,7 @@
strcpy(self->image->palette->mode, "RGBA");
self->image->palette->palette[index * 4 + 3] = (UINT8)alpha;

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand All @@ -1805,8 +1798,7 @@
self->image->palette->palette[i * 4 + 3] = (UINT8)values[i];
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -1842,8 +1834,7 @@
self->access->put_pixel(im, x, y, ink);
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -2010,8 +2001,7 @@
}
self->access = ImagingAccessNew(im);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -2074,8 +2064,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -2202,8 +2191,7 @@
}

if (!ImagingGetBBox(self->image, bbox, alpha_only)) {
Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

return Py_BuildValue("iiii", bbox[0], bbox[1], bbox[2], bbox[3]);
Expand Down Expand Up @@ -2283,8 +2271,7 @@
}
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;

Check warning on line 2274 in src/_imaging.c

View check run for this annotation

Codecov / codecov/patch

src/_imaging.c#L2274

Added line #L2274 was not covered by tests
}

static PyObject *
Expand Down Expand Up @@ -2347,8 +2334,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand All @@ -2363,8 +2349,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -2950,8 +2935,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -2988,8 +2972,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3045,8 +3028,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3100,8 +3082,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3164,8 +3145,7 @@

free(xy);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3196,8 +3176,7 @@

free(xy);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

/* from outline.c */
Expand Down Expand Up @@ -3225,8 +3204,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3282,8 +3260,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3334,8 +3311,7 @@

free(ixy);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -3389,8 +3365,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static struct PyMethodDef _draw_methods[] = {
Expand Down Expand Up @@ -3595,8 +3570,7 @@
return NULL;
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -3984,8 +3958,7 @@
arena->stats_freed_blocks = 0;
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -4045,8 +4018,7 @@
ImagingDefaultArena.alignment = alignment;
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand All @@ -4070,8 +4042,7 @@
ImagingDefaultArena.block_size = block_size;
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand Down Expand Up @@ -4099,8 +4070,7 @@
return ImagingError_MemoryError();
}

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

static PyObject *
Expand All @@ -4115,8 +4085,7 @@
ImagingMemoryClearCache(&ImagingDefaultArena, i);
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);

Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

/* -------------------------------------------------------------------- */
Expand Down
Loading
Loading