Lines Matching defs:data

136        checking for self-referential data-structures. */
441 /* Internal data type used as the unpickling stack. */
444 PyObject **data;
447 Py_ssize_t allocated; /* number of slots in data allocated */
455 Py_DECREF(self->data[i]);
457 PyMem_Free(self->data);
480 self->data = PyMem_Malloc(self->allocated * sizeof(PyObject *));
481 if (self->data)
501 Py_CLEAR(self->data[i]);
510 PyObject **data = self->data;
519 PyMem_RESIZE(data, PyObject *, new_allocated);
520 if (data == NULL)
523 self->data = data;
555 return self->data[Py_SIZE(self)];
565 self->data[Py_SIZE(self)] = obj;
594 PyTuple_SET_ITEM(tuple, j, self->data[i]);
611 PyList_SET_ITEM(list, j, self->data[i]);
654 Py_ssize_t buf_size; /* Size of the current buffered pickle data */
670 Pdata *stack; /* Pickle data stack, store unpickled objects. */
1236 PyErr_SetString(st->UnpicklingError, "pickle data was truncated");
1240 /* Skip any consumed data that was only prefetched using peek() */
1271 Update the unpickler's input buffer with the newly-read data. Returns -1 on
1275 unpickling from a file, the "we've run out of data" code paths will trigger,
1276 causing the Unpickler to go back to the file for more data. Use the returned
1277 size to tell you how much data you can process. */
1281 PyObject *data;
1290 data = PyObject_CallNoArgs(self->readline);
1294 /* Prefetch some data without advancing the file pointer, if possible */
1299 data = _Pickle_FastCall(self->peek, len);
1300 if (data == NULL) {
1308 read_size = _Unpickler_SetStringInput(self, data);
1309 Py_DECREF(data);
1318 data = _Pickle_FastCall(self->read, len);
1320 if (data == NULL)
1323 read_size = _Unpickler_SetStringInput(self, data);
1324 Py_DECREF(data);
1359 /* Read `n` bytes from the unpickler's data source, storing the result in `buf`.
1361 * This should only be used for non-small data reads where potentially
1363 * more data into the input buffer.
1372 /* Read from available buffer data, if any */
1402 PyObject* data = _Pickle_FastCall(self->read, len);
1403 if (data == NULL) {
1406 if (!PyBytes_Check(data)) {
1409 Py_TYPE(data));
1410 Py_DECREF(data);
1413 Py_ssize_t read_size = PyBytes_GET_SIZE(data);
1415 Py_DECREF(data);
1418 memcpy(buf, PyBytes_AS_STRING(data), n);
1419 Py_DECREF(data);
1448 /* Read `n` bytes from the unpickler's data source, storing the result in `*s`.
1450 This should be used for all data reads, rather than accessing the unpickler's
2151 * bytes of data, and nbits & 7 leftover bits. If there
2283 The large contiguous data is written directly into the underlying file
2291 const char *data, Py_ssize_t data_size,
2312 /* Bypass the in-memory buffer to directly stream large data
2325 payload = mem = PyBytes_FromStringAndSize(data, data_size);
2343 if (_Pickler_Write(self, data, data_size) < 0) {
2355 _save_bytes_data(PicklerObject *self, PyObject *obj, const char *data,
2391 if (_Pickler_write_bytes(self, header, len, data, size, obj) < 0) {
2453 _save_bytearray_data(PicklerObject *self, PyObject *obj, const char *data,
2468 if (_Pickler_write_bytes(self, header, len, data, size, obj) < 0) {
2548 /* Write data in-band */
2559 /* Write data out-of-band */
2581 const void *data;
2591 data = PyUnicode_DATA(obj);
2600 Py_UCS4 ch = PyUnicode_READ(kind, data, i);
2655 const char *data;
2660 data = PyUnicode_AsUTF8AndSize(obj, &size);
2661 if (data == NULL) {
2669 data = PyBytes_AS_STRING(encoded);
2700 if (_Pickler_write_bytes(self, header, len, data, size, encoded) < 0) {
4554 The memo is the data structure that remembers which objects the
4700 This takes a binary file for writing a pickle data stream.
4718 2, so that the pickle data stream is readable with Python 2.
5349 * data following.
5590 "pickle stream refers to out-of-band data "
5616 PyObject *obj = self->stack->data[len - 1];
5624 self->stack->data[len - 1] = view;
5779 key = self->stack->data[k - 1];
5780 value = self->stack->data[k];
6142 Py_DECREF(self->stack->data[len]);
6169 last = self->stack->data[len - 1];
6369 value = self->stack->data[Py_SIZE(self->stack) - 1];
6398 value = self->stack->data[Py_SIZE(self->stack) - 1];
6417 value = self->stack->data[Py_SIZE(self->stack) - 1];
6436 value = self->stack->data[Py_SIZE(self->stack) - 1];
6456 list = self->stack->data[x - 1];
6498 value = self->stack->data[i];
6556 dict = self->stack->data[x - 1];
6559 key = self->stack->data[i - 1];
6560 value = self->stack->data[i];
6601 set = self->stack->data[mark - 1];
6625 item = self->stack->data[i];
6657 inst = self->stack->data[Py_SIZE(self->stack) - 1];
7225 This takes a binary file for reading a pickle data stream.
7667 2, so that the pickle data stream is readable with Python 2.
7732 Python 2, so that the pickle data stream is readable with Python 2.
7780 Read and return an object from the pickle data stored in a file.
7841 data: object
7849 Read and return an object from the given pickle data.
7866 _pickle_loads_impl(PyObject *module, PyObject *data, int fix_imports,
7877 if (_Unpickler_SetStringInput(unpickler, data) < 0)