Head merge

This commit is contained in:
Łukasz Langa 2012-03-12 22:59:49 +01:00
commit d5c613e45f

View file

@ -2814,14 +2814,19 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
static int static int
save_ellipsis(PicklerObject *self, PyObject *obj) 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 static int
save_notimplemented(PicklerObject *self, PyObject *obj) save_notimplemented(PicklerObject *self, PyObject *obj)
{ {
return save_global(self, Py_NotImplemented, PyObject *str = PyUnicode_FromString("NotImplemented");
PyUnicode_FromString("NotImplemented")); if (str == NULL)
return -1;
return save_global(self, Py_NotImplemented, str);
} }
static int static int