Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unused variables #7205

Merged
merged 2 commits into from Jun 10, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/PIL/Image.py
Expand Up @@ -1254,7 +1254,7 @@ def _expand(self, xmargin, ymargin=None):
if ymargin is None:
ymargin = xmargin
self.load()
return self._new(self.im.expand(xmargin, ymargin, 0))
return self._new(self.im.expand(xmargin, ymargin))

def filter(self, filter):
"""
Expand Down
5 changes: 2 additions & 3 deletions src/_imaging.c
Expand Up @@ -1027,12 +1027,11 @@ _crop(ImagingObject *self, PyObject *args) {
static PyObject *
_expand_image(ImagingObject *self, PyObject *args) {
int x, y;
int mode = 0;
if (!PyArg_ParseTuple(args, "ii|i", &x, &y, &mode)) {
if (!PyArg_ParseTuple(args, "ii", &x, &y)) {
return NULL;
}

return PyImagingNew(ImagingExpand(self->image, x, y, mode));
return PyImagingNew(ImagingExpand(self->image, x, y));
}

static PyObject *
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/Filter.c
Expand Up @@ -49,7 +49,7 @@ clip32(float in) {
}

Imaging
ImagingExpand(Imaging imIn, int xmargin, int ymargin, int mode) {
ImagingExpand(Imaging imIn, int xmargin, int ymargin) {
Imaging imOut;
int x, y;
ImagingSectionCookie cookie;
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/Imaging.h
Expand Up @@ -290,7 +290,7 @@ ImagingConvertTransparent(Imaging im, const char *mode, int r, int g, int b);
extern Imaging
ImagingCrop(Imaging im, int x0, int y0, int x1, int y1);
extern Imaging
ImagingExpand(Imaging im, int x, int y, int mode);
ImagingExpand(Imaging im, int x, int y);
extern Imaging
ImagingFill(Imaging im, const void *ink);
extern int
Expand Down
2 changes: 0 additions & 2 deletions src/libImaging/Storage.c
Expand Up @@ -37,8 +37,6 @@
#include "Imaging.h"
#include <string.h>

int ImagingNewCount = 0;

/* --------------------------------------------------------------------
* Standard image object.
*/
Expand Down