summaryrefslogtreecommitdiff
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 79113e0a93..947069afbe 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -346,7 +346,7 @@ _Pickle_FastCall(PyObject *func, PyObject *obj)
{
PyObject *result;
- result = _PyObject_CallArg1(func, obj);
+ result = PyObject_CallFunctionObjArgs(func, obj, NULL);
Py_DECREF(obj);
return result;
}
@@ -1941,7 +1941,7 @@ save_long(PicklerObject *self, PyObject *obj)
goto error;
}
else {
- char *string;
+ const char *string;
/* proto < 2: write the repr and newline. This is quadratic-time (in
the number of digits), in both directions. We add a trailing 'L'
@@ -2218,7 +2218,7 @@ write_unicode_binary(PicklerObject *self, PyObject *obj)
{
PyObject *encoded = NULL;
Py_ssize_t size;
- char *data;
+ const char *data;
int r;
if (PyUnicode_READY(obj))
@@ -4571,8 +4571,8 @@ find_class(UnpicklerObject *self, PyObject *module_name, PyObject *global_name)
{
_Py_IDENTIFIER(find_class);
- return _PyObject_CallMethodId((PyObject *)self, &PyId_find_class, "OO",
- module_name, global_name);
+ return _PyObject_CallMethodIdObjArgs((PyObject *)self, &PyId_find_class,
+ module_name, global_name, NULL);
}
static Py_ssize_t
@@ -4762,7 +4762,7 @@ static int
load_long(UnpicklerObject *self)
{
PyObject *value;
- char *s;
+ char *s = NULL;
Py_ssize_t len;
if ((len = _Unpickler_Readline(self, &s)) < 0)
@@ -4993,7 +4993,7 @@ load_unicode(UnpicklerObject *self)
{
PyObject *str;
Py_ssize_t len;
- char *s;
+ char *s = NULL;
if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1;
@@ -5184,7 +5184,7 @@ instantiate(PyObject *cls, PyObject *args)
else {
_Py_IDENTIFIER(__new__);
- result = _PyObject_CallMethodId(cls, &PyId___new__, "O", cls);
+ result = _PyObject_CallMethodIdObjArgs(cls, &PyId___new__, cls, NULL);
}
return result;
}
@@ -5732,7 +5732,7 @@ load_put(UnpicklerObject *self)
PyObject *key, *value;
Py_ssize_t idx;
Py_ssize_t len;
- char *s;
+ char *s = NULL;
if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1;