Got test_pickletools and test_pickle working.

(Alas, test_cpickle is still broken.)
This commit is contained in:
Guido van Rossum 2007-05-08 21:26:54 +00:00
parent f9e91c9c58
commit cfe5f20fe8
5 changed files with 172 additions and 145 deletions

View file

@ -5241,6 +5241,13 @@ cpm_dumps(PyObject *self, PyObject *args, PyObject *kwds)
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);