mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Got test_pickletools and test_pickle working.
(Alas, test_cpickle is still broken.)
This commit is contained in:
parent
f9e91c9c58
commit
cfe5f20fe8
5 changed files with 172 additions and 145 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue