Skip to content

Commit 3dd621a

Browse files
authored
Add args argument to METH_NOARGS methods (#9687)
1 parent c823253 commit 3dd621a

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/_avif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {
585585
}
586586

587587
PyObject *
588-
_encoder_finish(AvifEncoderObject *self) {
588+
_encoder_finish(AvifEncoderObject *self, PyObject *args) {
589589
avifEncoder *encoder = self->encoder;
590590

591591
avifRWData raw = AVIF_DATA_EMPTY;
@@ -701,7 +701,7 @@ _decoder_dealloc(AvifDecoderObject *self) {
701701
}
702702

703703
PyObject *
704-
_decoder_get_info(AvifDecoderObject *self) {
704+
_decoder_get_info(AvifDecoderObject *self, PyObject *args) {
705705
avifDecoder *decoder = self->decoder;
706706
avifImage *image = decoder->image;
707707

src/_imaging.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ _getpalette(ImagingObject *self, PyObject *args) {
12041204
}
12051205

12061206
static PyObject *
1207-
_getpalettemode(ImagingObject *self) {
1207+
_getpalettemode(ImagingObject *self, PyObject *args) {
12081208
if (!self->image->palette) {
12091209
PyErr_SetString(PyExc_ValueError, no_palette);
12101210
return NULL;
@@ -2253,7 +2253,7 @@ _box_blur(ImagingObject *self, PyObject *args) {
22532253
/* -------------------------------------------------------------------- */
22542254

22552255
static PyObject *
2256-
_isblock(ImagingObject *self) {
2256+
_isblock(ImagingObject *self, PyObject *args) {
22572257
return PyBool_FromLong(self->image->block != NULL);
22582258
}
22592259

@@ -2318,7 +2318,7 @@ _getcolors(ImagingObject *self, PyObject *args) {
23182318
}
23192319

23202320
static PyObject *
2321-
_getextrema(ImagingObject *self) {
2321+
_getextrema(ImagingObject *self, PyObject *args) {
23222322
union {
23232323
UINT8 u[2];
23242324
INT32 i[2];
@@ -2351,7 +2351,7 @@ _getextrema(ImagingObject *self) {
23512351
}
23522352

23532353
static PyObject *
2354-
_getprojection(ImagingObject *self) {
2354+
_getprojection(ImagingObject *self, PyObject *args) {
23552355
unsigned char *xprofile;
23562356
unsigned char *yprofile;
23572357
PyObject *result;
@@ -2477,7 +2477,7 @@ _merge(PyObject *self, PyObject *args) {
24772477
}
24782478

24792479
static PyObject *
2480-
_split(ImagingObject *self) {
2480+
_split(ImagingObject *self, PyObject *args) {
24812481
Py_ssize_t i;
24822482
PyObject *list;
24832483
PyObject *imaging_object;
@@ -2506,7 +2506,7 @@ _split(ImagingObject *self) {
25062506
/* Channel operations (ImageChops) ------------------------------------ */
25072507

25082508
static PyObject *
2509-
_chop_invert(ImagingObject *self) {
2509+
_chop_invert(ImagingObject *self, PyObject *args) {
25102510
return PyImagingNew(ImagingNegative(self->image));
25112511
}
25122512

src/_imagingft.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ font_render(FontObject *self, PyObject *args) {
12731273
}
12741274

12751275
static PyObject *
1276-
font_getvarnames(FontObject *self) {
1276+
font_getvarnames(FontObject *self, PyObject *args) {
12771277
int error;
12781278
FT_UInt i, j, num_namedstyles, name_count;
12791279
FT_MM_Var *master;
@@ -1338,7 +1338,7 @@ font_getvarnames(FontObject *self) {
13381338
}
13391339

13401340
static PyObject *
1341-
font_getvaraxes(FontObject *self) {
1341+
font_getvaraxes(FontObject *self, PyObject *args) {
13421342
int error;
13431343
FT_UInt i, j, num_axis, name_count;
13441344
FT_MM_Var *master;

src/_webp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ _anim_decoder_dealloc(PyObject *self) {
449449
}
450450

451451
PyObject *
452-
_anim_decoder_get_info(PyObject *self) {
452+
_anim_decoder_get_info(PyObject *self, PyObject *args) {
453453
WebPAnimDecoderObject *decp = (WebPAnimDecoderObject *)self;
454454
WebPAnimInfo *info = &(decp->info);
455455

@@ -488,7 +488,7 @@ _anim_decoder_get_chunk(PyObject *self, PyObject *args) {
488488
}
489489

490490
PyObject *
491-
_anim_decoder_get_next(PyObject *self) {
491+
_anim_decoder_get_next(PyObject *self, PyObject *args) {
492492
uint8_t *buf;
493493
int timestamp;
494494
int ok;
@@ -519,7 +519,7 @@ _anim_decoder_get_next(PyObject *self) {
519519
}
520520

521521
PyObject *
522-
_anim_decoder_reset(PyObject *self) {
522+
_anim_decoder_reset(PyObject *self, PyObject *args) {
523523
WebPAnimDecoderObject *decp = (WebPAnimDecoderObject *)self;
524524
WebPAnimDecoderReset(decp->dec);
525525
Py_RETURN_NONE;

src/encode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ _encode(ImagingEncoderObject *encoder, PyObject *args) {
153153
}
154154

155155
static PyObject *
156-
_encode_to_pyfd(ImagingEncoderObject *encoder) {
156+
_encode_to_pyfd(ImagingEncoderObject *encoder, PyObject *args) {
157157
PyObject *result;
158158
int status;
159159

0 commit comments

Comments
 (0)