mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-26579: Add object.__getstate__(). (GH-2821)
Copying and pickling instances of subclasses of builtin types bytearray, set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes implemented as slots.
This commit is contained in:
parent
f82f9ce323
commit
884eba3c76
25 changed files with 389 additions and 255 deletions
|
@ -299,6 +299,11 @@ PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *);
|
|||
*/
|
||||
PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
|
||||
|
||||
/* Pickle support. */
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(PyObject *) _PyObject_GetState(PyObject *);
|
||||
#endif
|
||||
|
||||
|
||||
/* Helpers for printing recursive container types */
|
||||
PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue