Skip to content

Commit 7a9579c

Browse files
Got rid of redundand "self" parameter declarations.
Argument Clinic is now able to infer all needed information.
1 parent 312f208 commit 7a9579c

7 files changed

Lines changed: 57 additions & 97 deletions

File tree

Modules/_bz2module.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,6 @@ decompress(BZ2Decompressor *d, char *data, size_t len, Py_ssize_t max_length)
592592
/*[clinic input]
593593
_bz2.BZ2Decompressor.decompress
594594
595-
self: self(type="BZ2Decompressor *")
596595
data: Py_buffer
597596
max_length: Py_ssize_t=-1
598597
@@ -615,7 +614,7 @@ the unused_data attribute.
615614
static PyObject *
616615
_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data,
617616
Py_ssize_t max_length)
618-
/*[clinic end generated code: output=23e41045deb240a3 input=9558b424c8b00516]*/
617+
/*[clinic end generated code: output=23e41045deb240a3 input=52e1ffc66a8ea624]*/
619618
{
620619
PyObject *result = NULL;
621620

Modules/_lzmamodule.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ compress(Compressor *c, uint8_t *data, size_t len, lzma_action action)
553553
/*[clinic input]
554554
_lzma.LZMACompressor.compress
555555
556-
self: self(type="Compressor *")
557556
data: Py_buffer
558557
/
559558
@@ -567,7 +566,7 @@ flush() method to finish the compression process.
567566

568567
static PyObject *
569568
_lzma_LZMACompressor_compress_impl(Compressor *self, Py_buffer *data)
570-
/*[clinic end generated code: output=31f615136963e00f input=8b60cb13e0ce6420]*/
569+
/*[clinic end generated code: output=31f615136963e00f input=64019eac7f2cc8d0]*/
571570
{
572571
PyObject *result = NULL;
573572

@@ -583,8 +582,6 @@ _lzma_LZMACompressor_compress_impl(Compressor *self, Py_buffer *data)
583582
/*[clinic input]
584583
_lzma.LZMACompressor.flush
585584
586-
self: self(type="Compressor *")
587-
588585
Finish the compression process.
589586
590587
Returns the compressed data left in internal buffers.
@@ -594,7 +591,7 @@ The compressor object may not be used after this method is called.
594591

595592
static PyObject *
596593
_lzma_LZMACompressor_flush_impl(Compressor *self)
597-
/*[clinic end generated code: output=fec21f3e22504f50 input=3060fb26f9b4042c]*/
594+
/*[clinic end generated code: output=fec21f3e22504f50 input=6b369303f67ad0a8]*/
598595
{
599596
PyObject *result = NULL;
600597

@@ -698,7 +695,6 @@ Compressor_init_raw(lzma_stream *lzs, PyObject *filterspecs)
698695
/*[-clinic input]
699696
_lzma.LZMACompressor.__init__
700697
701-
self: self(type="Compressor *")
702698
format: int(c_default="FORMAT_XZ") = FORMAT_XZ
703699
The container format to use for the output. This can
704700
be FORMAT_XZ (default), FORMAT_ALONE, or FORMAT_RAW.
@@ -1063,7 +1059,6 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
10631059
/*[clinic input]
10641060
_lzma.LZMADecompressor.decompress
10651061
1066-
self: self(type="Decompressor *")
10671062
data: Py_buffer
10681063
max_length: Py_ssize_t=-1
10691064
@@ -1086,7 +1081,7 @@ the unused_data attribute.
10861081
static PyObject *
10871082
_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data,
10881083
Py_ssize_t max_length)
1089-
/*[clinic end generated code: output=ef4e20ec7122241d input=f2bb902cc1caf203]*/
1084+
/*[clinic end generated code: output=ef4e20ec7122241d input=60c1f135820e309d]*/
10901085
{
10911086
PyObject *result = NULL;
10921087

@@ -1126,7 +1121,6 @@ Decompressor_init_raw(lzma_stream *lzs, PyObject *filterspecs)
11261121
/*[clinic input]
11271122
_lzma.LZMADecompressor.__init__
11281123
1129-
self: self(type="Decompressor *")
11301124
format: int(c_default="FORMAT_AUTO") = FORMAT_AUTO
11311125
Specifies the container format of the input stream. If this is
11321126
FORMAT_AUTO (the default), the decompressor will automatically detect
@@ -1152,7 +1146,7 @@ For one-shot decompression, use the decompress() function instead.
11521146
static int
11531147
_lzma_LZMADecompressor___init___impl(Decompressor *self, int format,
11541148
PyObject *memlimit, PyObject *filters)
1155-
/*[clinic end generated code: output=3e1821f8aa36564c input=458ca6132ef29801]*/
1149+
/*[clinic end generated code: output=3e1821f8aa36564c input=81fe684a6c2f8a27]*/
11561150
{
11571151
const uint32_t decoder_flags = LZMA_TELL_ANY_CHECK | LZMA_TELL_NO_CHECK;
11581152
uint64_t memlimit_ = UINT64_MAX;

Modules/_tkinter.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,6 @@ Tkapp_CommandProc(CommandEvent *ev, int flags)
24852485
/*[clinic input]
24862486
_tkinter.tkapp.createcommand
24872487
2488-
self: self(type="TkappObject *")
24892488
name: str
24902489
func: object
24912490
/
@@ -2495,7 +2494,7 @@ _tkinter.tkapp.createcommand
24952494
static PyObject *
24962495
_tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
24972496
PyObject *func)
2498-
/*[clinic end generated code: output=2a1c79a4ee2af410 input=2bc2c046a0914234]*/
2497+
/*[clinic end generated code: output=2a1c79a4ee2af410 input=255785cb70edc6a0]*/
24992498
{
25002499
PythonCmd_ClientData *data;
25012500
int err;
@@ -2561,15 +2560,14 @@ _tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
25612560
/*[clinic input]
25622561
_tkinter.tkapp.deletecommand
25632562
2564-
self: self(type="TkappObject *")
25652563
name: str
25662564
/
25672565
25682566
[clinic start generated code]*/
25692567

25702568
static PyObject *
25712569
_tkinter_tkapp_deletecommand_impl(TkappObject *self, const char *name)
2572-
/*[clinic end generated code: output=a67e8cb5845e0d2d input=b6306468f10b219c]*/
2570+
/*[clinic end generated code: output=a67e8cb5845e0d2d input=53e9952eae1f85f5]*/
25732571
{
25742572
int err;
25752573

@@ -2762,13 +2760,11 @@ typedef struct {
27622760
/*[clinic input]
27632761
_tkinter.tktimertoken.deletetimerhandler
27642762
2765-
self: self(type="TkttObject *")
2766-
27672763
[clinic start generated code]*/
27682764

27692765
static PyObject *
27702766
_tkinter_tktimertoken_deletetimerhandler_impl(TkttObject *self)
2771-
/*[clinic end generated code: output=bd7fe17f328cfa55 input=25ba5dd594e52084]*/
2767+
/*[clinic end generated code: output=bd7fe17f328cfa55 input=40bd070ff85f5cf3]*/
27722768
{
27732769
TkttObject *v = self;
27742770
PyObject *func = v->func;
@@ -2894,15 +2890,14 @@ _tkinter_tkapp_createtimerhandler_impl(TkappObject *self, int milliseconds,
28942890
/*[clinic input]
28952891
_tkinter.tkapp.mainloop
28962892
2897-
self: self(type="TkappObject *")
28982893
threshold: int = 0
28992894
/
29002895
29012896
[clinic start generated code]*/
29022897

29032898
static PyObject *
29042899
_tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold)
2905-
/*[clinic end generated code: output=0ba8eabbe57841b0 input=ad57c9c1dd2b9470]*/
2900+
/*[clinic end generated code: output=0ba8eabbe57841b0 input=036bcdcf03d5eca0]*/
29062901
{
29072902
#ifdef WITH_THREAD
29082903
PyThreadState *tstate = PyThreadState_Get();
@@ -3072,13 +3067,11 @@ Tkapp_WantObjects(PyObject *self, PyObject *args)
30723067
/*[clinic input]
30733068
_tkinter.tkapp.willdispatch
30743069
3075-
self: self(type="TkappObject *")
3076-
30773070
[clinic start generated code]*/
30783071

30793072
static PyObject *
30803073
_tkinter_tkapp_willdispatch_impl(TkappObject *self)
3081-
/*[clinic end generated code: output=0e3f46d244642155 input=2630699767808970]*/
3074+
/*[clinic end generated code: output=0e3f46d244642155 input=d88f5970843d6dab]*/
30823075
{
30833076
self->dispatching = 1;
30843077

0 commit comments

Comments
 (0)