Lines Matching refs:size

139     /* Initial size of the write buffer of Pickler. */
142 /* Prefetch size when unpickling (disabled on unpeekable streams) */
646 Py_ssize_t max_output_len; /* Allocation size of output_buffer. */
704 Py_ssize_t marks_size; /* Current allocated size of the mark stack. */
772 Free it and allocate one that's the right size. */
861 /* Find the smallest valid table size >= min_size. */
928 * If used >= 2/3 size, adjust size. Normally, this quaduples the size.
930 * Quadrupling the size improves average table sparseness
1011 /* Resize down to exact size */
1216 /* Returns the size of the input on success, -1 on failure. This takes its
1277 size to tell you how much data you can process. */
1348 /* Extend the buffer to satisfy desired size */
1438 "readinto() returned negative size");
2080 Py_ssize_t size;
2193 size = 2;
2197 size = (Py_ssize_t) nbytes;
2199 header[i] = (unsigned char)(size & 0xff);
2200 size >>= 8;
2202 size = 5;
2204 if (_Pickler_Write(self, header, size) < 0 ||
2220 string = PyUnicode_AsUTF8AndSize(repr, &size);
2225 _Pickler_Write(self, string, size) < 0 ||
2356 Py_ssize_t size)
2363 if (size < 0)
2366 if (size <= 0xff) {
2368 header[1] = (unsigned char)size;
2371 else if ((size_t)size <= 0xffffffffUL) {
2373 header[1] = (unsigned char)(size & 0xff);
2374 header[2] = (unsigned char)((size >> 8) & 0xff);
2375 header[3] = (unsigned char)((size >> 16) & 0xff);
2376 header[4] = (unsigned char)((size >> 24) & 0xff);
2381 _write_size64(header + 1, size);
2391 if (_Pickler_write_bytes(self, header, len, data, size, obj) < 0) {
2454 Py_ssize_t size)
2461 if (size < 0)
2465 _write_size64(header + 1, size);
2468 if (_Pickler_write_bytes(self, header, len, data, size, obj) < 0) {
2580 Py_ssize_t i, size;
2590 size = PyUnicode_GET_LENGTH(obj);
2594 p = _PyBytesWriter_Alloc(&writer, size);
2599 for (i=0; i < size; i++) {
2654 Py_ssize_t size;
2660 data = PyUnicode_AsUTF8AndSize(obj, &size);
2670 size = PyBytes_GET_SIZE(encoded);
2673 assert(size >= 0);
2674 if (size <= 0xff && self->proto >= 4) {
2676 header[1] = (unsigned char)(size & 0xff);
2679 else if ((size_t)size <= 0xffffffffUL) {
2681 header[1] = (unsigned char)(size & 0xff);
2682 header[2] = (unsigned char)((size >> 8) & 0xff);
2683 header[3] = (unsigned char)((size >> 16) & 0xff);
2684 header[4] = (unsigned char)((size >> 24) & 0xff);
2689 _write_size64(header + 1, size);
2700 if (_Pickler_write_bytes(self, header, len, data, size, encoded) < 0) {
2717 Py_ssize_t size;
2729 size = PyBytes_GET_SIZE(encoded);
2730 if (_Pickler_Write(self, PyBytes_AS_STRING(encoded), size) < 0) {
3307 "dictionary changed size during iteration");
3447 "set changed size during iteration");
3966 Py_ssize_t size;
3974 size = PyTuple_Size(args);
3975 if (size < 2 || size > 6) {
4611 Returns size in memory, in bytes.
5228 * have 64-bit size that can't be represented on 32-bit platform.
5274 load_binintx(UnpicklerObject *self, char *s, int size)
5279 x = calc_binint(s, size);
5348 /* 'size' bytes contain the # of bytes of little-endian 256's-complement
5352 load_counted_long(UnpicklerObject *self, int size)
5358 assert(size == 1 || size == 4);
5359 if (_Unpickler_Read(self, &nbytes, size) < 0)
5362 size = calc_binint(nbytes, size);
5363 if (size < 0) {
5371 if (size == 0)
5375 if (_Unpickler_Read(self, &pdata, size) < 0)
5377 value = _PyLong_FromByteArray((unsigned char *)pdata, (size_t)size,
5488 Py_ssize_t size;
5494 size = calc_binsize(s, nbytes);
5495 if (size < 0) {
5498 "BINSTRING exceeds system's maximum size of %zd bytes",
5503 if (_Unpickler_Read(self, &s, size) < 0)
5509 obj = PyBytes_FromStringAndSize(s, size);
5512 obj = PyUnicode_Decode(s, size, self->encoding, self->errors);
5526 Py_ssize_t size;
5532 size = calc_binsize(s, nbytes);
5533 if (size < 0) {
5535 "BINBYTES exceeds system's maximum size of %zd bytes",
5540 bytes = PyBytes_FromStringAndSize(NULL, size);
5543 if (_Unpickler_ReadInto(self, PyBytes_AS_STRING(bytes), size) < 0) {
5556 Py_ssize_t size;
5563 size = calc_binsize(s, 8);
5564 if (size < 0) {
5566 "BYTEARRAY8 exceeds system's maximum size of %zd bytes",
5571 bytearray = PyByteArray_FromStringAndSize(NULL, size);
5575 if (_Unpickler_ReadInto(self, PyByteArray_AS_STRING(bytearray), size) < 0) {
5658 Py_ssize_t size;
5664 size = calc_binsize(s, nbytes);
5665 if (size < 0) {
5667 "BINUNICODE exceeds system's maximum size of %zd bytes",
5672 if (_Unpickler_Read(self, &s, size) < 0)
5675 str = PyUnicode_DecodeUTF8(s, size, "surrogatepass");
7118 Returns size in memory, in bytes.