Home
last modified time | relevance | path

Searched refs:buffer_callback (Results 1 – 5 of 5) sorted by relevance

/external/python/cpython3/Modules/clinic/
D_pickle.c.h103 PyObject *buffer_callback);
118 PyObject *buffer_callback = Py_None; in _pickle_Pickler___init__() local
143 buffer_callback = fastargs[3]; in _pickle_Pickler___init__()
145 …_pickle_Pickler___init___impl((PicklerObject *)self, file, protocol, fix_imports, buffer_callback); in _pickle_Pickler___init__()
494 PyObject *buffer_callback);
508 PyObject *buffer_callback = Py_None; in _pickle_dump() local
538 buffer_callback = args[4]; in _pickle_dump()
540 return_value = _pickle_dump_impl(module, obj, file, protocol, fix_imports, buffer_callback); in _pickle_dump()
575 int fix_imports, PyObject *buffer_callback);
588 PyObject *buffer_callback = Py_None; in _pickle_dumps() local
[all …]
/external/python/cpython3/Lib/test/
Dpickletester.py2724 def buffer_callback(obj): function
2727 buffer_callback=buffer_callback)
2746 buffer_callback=[].append)
2749 buffer_callback = lambda pb: buffers.append(pb.raw()) function
2751 buffer_callback=buffer_callback)
2786 buffer_callback = buffers.append
2787 data = self.dumps(obj, proto, buffer_callback=buffer_callback)
2802 def buffer_callback(buffers): function
2806 self.dumps(pb, 5, buffer_callback=buffer_callback)
2811 data = self.dumps(pb, proto, buffer_callback=[].append)
[all …]
/external/python/cpython3/Doc/library/
Dpickle.rst216 .. function:: dump(obj, file, protocol=None, \*, fix_imports=True, buffer_callback=None)
222 Arguments *file*, *protocol*, *fix_imports* and *buffer_callback* have
226 The *buffer_callback* argument was added.
228 .. function:: dumps(obj, protocol=None, \*, fix_imports=True, buffer_callback=None)
233 Arguments *protocol*, *fix_imports* and *buffer_callback* have the same
237 The *buffer_callback* argument was added.
299 .. class:: Pickler(file, protocol=None, \*, fix_imports=True, buffer_callback=None)
317 If *buffer_callback* is None (the default), buffer views are
320 If *buffer_callback* is not None, then it can be called any number
325 It is an error if *buffer_callback* is not None and *protocol* is
[all …]
/external/python/cpython3/Lib/
Dpickle.py410 buffer_callback=None): argument
450 if buffer_callback is not None and protocol < 5:
452 self._buffer_callback = buffer_callback
1749 def _dump(obj, file, protocol=None, *, fix_imports=True, buffer_callback=None): argument
1751 buffer_callback=buffer_callback).dump(obj)
1753 def _dumps(obj, protocol=None, *, fix_imports=True, buffer_callback=None): argument
1756 buffer_callback=buffer_callback).dump(obj)
/external/python/cpython3/Modules/
D_pickle.c653 PyObject *buffer_callback; /* Callback for out-of-band buffers, or NULL */ member
1115 self->buffer_callback = NULL; in _Pickler_New()
1189 _Pickler_SetBufferCallback(PicklerObject *self, PyObject *buffer_callback) in _Pickler_SetBufferCallback() argument
1191 if (buffer_callback == Py_None) { in _Pickler_SetBufferCallback()
1192 buffer_callback = NULL; in _Pickler_SetBufferCallback()
1194 if (buffer_callback != NULL && self->proto < 5) { in _Pickler_SetBufferCallback()
1200 Py_XINCREF(buffer_callback); in _Pickler_SetBufferCallback()
1201 self->buffer_callback = buffer_callback; in _Pickler_SetBufferCallback()
2539 if (self->buffer_callback != NULL) { in save_picklebuffer()
2540 PyObject *ret = PyObject_CallOneArg(self->buffer_callback, obj); in save_picklebuffer()
[all …]