commit | cfe5f20fe82806b85c971e43e18564e60108dd08 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue May 08 21:26:54 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue May 08 21:26:54 2007 +0000 |
tree | 0ddd21800971710d6decd02c0c6b867a153c8378 | |
parent | f9e91c9c58de72afdf51f2a6ebfe50e98beeaa78 [diff] [blame] |
Got test_pickletools and test_pickle working. (Alas, test_cpickle is still broken.)
diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 00641d8..639e68b 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c
@@ -5241,6 +5241,13 @@ goto finally; res = PycStringIO->cgetvalue(file); + if (res == NULL) + goto finally; + if (!PyBytes_Check(res)) { + PyObject *tmp = res; + res = PyBytes_FromObject(res); + Py_DECREF(tmp); + } finally: Py_XDECREF(pickler);