summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2012-03-12 21:59:49 (GMT)
committerŁukasz Langa <lukasz@langa.pl>2012-03-12 21:59:49 (GMT)
commitd5c613e45fa2a7d038e64520247a798600d002ed (patch)
tree0915f38f050fd0d269e17dd890cc52e6eff5c874
parent48d578c02a98dfd339afc1f8c86dafde31a7e994 (diff)
parentdbd7825d56339d42abfb21d5360148a1f5258bf3 (diff)
downloadcpython-d5c613e45fa2a7d038e64520247a798600d002ed.zip
cpython-d5c613e45fa2a7d038e64520247a798600d002ed.tar.gz
cpython-d5c613e45fa2a7d038e64520247a798600d002ed.tar.bz2
Head merge
-rw-r--r--Modules/_pickle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 4212e7a..36aa9e0 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