Head merge

This commit is contained in:
Łukasz Langa 2012-03-12 22:59:49 +01:00
commit d5c613e45f
1 changed files with 8 additions and 3 deletions

View File

@ -2814,14 +2814,19 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
static int
save_ellipsis(PicklerObject *self, PyObject *obj)
{
return save_global(self, Py_Ellipsis, PyUnicode_FromString("Ellipsis"));
PyObject *str = PyUnicode_FromString("Ellipsis");
if (str == NULL)
return -1;
return save_global(self, Py_Ellipsis, str);
}
static int
save_notimplemented(PicklerObject *self, PyObject *obj)
{
return save_global(self, Py_NotImplemented,
PyUnicode_FromString("NotImplemented"));
PyObject *str = PyUnicode_FromString("NotImplemented");
if (str == NULL)
return -1;
return save_global(self, Py_NotImplemented, str);
}
static int