summaryrefslogtreecommitdiff
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-03-12 15:25:12 -0700
committerMichael Foord <michael@voidspace.org.uk>2012-03-12 15:25:12 -0700
commit56bac7b9e13cc77927383a5bf97f30c3211fc7a8 (patch)
tree8fb9c6aaabcc6cd87ad2809b64fbca2aefbe6b1d /Modules/_pickle.c
parentb36c70c9ff3c39441c8ab2ac264d039d98a47f67 (diff)
parentd5c613e45fa2a7d038e64520247a798600d002ed (diff)
downloadcpython-git-56bac7b9e13cc77927383a5bf97f30c3211fc7a8.tar.gz
Merge
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 4212e7a02f..36aa9e00a8 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -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