bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
(cherry picked from commit d4f9cf5545d6d8844e0726552ef2e366f5cc3abd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index fa26859..a96924c 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -842,7 +842,7 @@
}
static PyObject *
-PyTclObject_str(PyTclObject *self, void *ignored)
+PyTclObject_str(PyTclObject *self)
{
if (self->string) {
Py_INCREF(self->string);
@@ -855,7 +855,7 @@
static PyObject *
PyTclObject_repr(PyTclObject *self)
{
- PyObject *repr, *str = PyTclObject_str(self, NULL);
+ PyObject *repr, *str = PyTclObject_str(self);
if (str == NULL)
return NULL;
repr = PyUnicode_FromFormat("<%s object: %R>",