summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 17:34:35 (GMT)
committerGitHub <noreply@github.com>2018-11-27 17:34:35 (GMT)
commitd4f9cf5545d6d8844e0726552ef2e366f5cc3abd (patch)
tree7aefae9861ee6b83652f6a352397b9dc145cc0d3 /Modules/_pickle.c
parent1005c84535191a72ebb7587d8c5636a065b7ed79 (diff)
downloadcpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.zip
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.gz
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.bz2
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 3a77005..39f8b75 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -4561,13 +4561,13 @@ PicklerMemoProxy_New(PicklerObject *pickler)
/*****************************************************************************/
static PyObject *
-Pickler_get_memo(PicklerObject *self)
+Pickler_get_memo(PicklerObject *self, void *Py_UNUSED(ignored))
{
return PicklerMemoProxy_New(self);
}
static int
-Pickler_set_memo(PicklerObject *self, PyObject *obj)
+Pickler_set_memo(PicklerObject *self, PyObject *obj, void *Py_UNUSED(ignored))
{
PyMemoTable *new_memo = NULL;
@@ -4629,7 +4629,7 @@ Pickler_set_memo(PicklerObject *self, PyObject *obj)
}
static PyObject *
-Pickler_get_persid(PicklerObject *self)
+Pickler_get_persid(PicklerObject *self, void *Py_UNUSED(ignored))
{
if (self->pers_func == NULL) {
PyErr_SetString(PyExc_AttributeError, "persistent_id");
@@ -4639,7 +4639,7 @@ Pickler_get_persid(PicklerObject *self)
}
static int
-Pickler_set_persid(PicklerObject *self, PyObject *value)
+Pickler_set_persid(PicklerObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
if (value == NULL) {
PyErr_SetString(PyExc_TypeError,
@@ -6999,13 +6999,13 @@ UnpicklerMemoProxy_New(UnpicklerObject *unpickler)
static PyObject *
-Unpickler_get_memo(UnpicklerObject *self)
+Unpickler_get_memo(UnpicklerObject *self, void *Py_UNUSED(ignored))
{
return UnpicklerMemoProxy_New(self);
}
static int
-Unpickler_set_memo(UnpicklerObject *self, PyObject *obj)
+Unpickler_set_memo(UnpicklerObject *self, PyObject *obj, void *Py_UNUSED(ignored))
{
PyObject **new_memo;
size_t new_memo_size = 0;
@@ -7082,7 +7082,7 @@ Unpickler_set_memo(UnpicklerObject *self, PyObject *obj)
}
static PyObject *
-Unpickler_get_persload(UnpicklerObject *self)
+Unpickler_get_persload(UnpicklerObject *self, void *Py_UNUSED(ignored))
{
if (self->pers_func == NULL) {
PyErr_SetString(PyExc_AttributeError, "persistent_load");
@@ -7092,7 +7092,7 @@ Unpickler_get_persload(UnpicklerObject *self)
}
static int
-Unpickler_set_persload(UnpicklerObject *self, PyObject *value)
+Unpickler_set_persload(UnpicklerObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
if (value == NULL) {
PyErr_SetString(PyExc_TypeError,