Lines Matching defs:len

583     Py_ssize_t len, i, j;
589 len = Py_SIZE(self) - start;
590 tuple = PyTuple_New(len);
593 for (i = start, j = 0; j < len; i++, j++)
604 Py_ssize_t len, i, j;
606 len = Py_SIZE(self) - start;
607 list = PyList_New(len);
610 for (i = start, j = 0; j < len; i++, j++)
1226 self->input_len = self->buffer.len;
1293 PyObject *len;
1296 len = PyLong_FromSsize_t(PREFETCH);
1297 if (len == NULL)
1299 data = _Pickle_FastCall(self->peek, len);
1315 len = PyLong_FromSsize_t(n);
1316 if (len == NULL)
1318 data = _Pickle_FastCall(self->read, len);
1398 PyObject* len = PyLong_FromSsize_t(n);
1399 if (len == NULL) {
1402 PyObject* data = _Pickle_FastCall(self->read, len);
1469 _Unpickler_CopyLine(UnpicklerObject *self, char *line, Py_ssize_t len,
1472 char *input_line = PyMem_Realloc(self->input_line, len + 1);
1478 memcpy(input_line, line, len);
1479 input_line[len] = '\0';
1482 return len;
1713 Py_ssize_t len;
1725 len = strlen(pdata);
1731 len = 2;
1739 len = 5;
1749 if (_Pickler_Write(self, pdata, len) < 0)
1761 Py_ssize_t len;
1782 len = strlen(pdata);
1788 len = 2;
1796 len = 5;
1805 if (_Pickler_Write(self, pdata, len) < 0)
2099 Py_ssize_t len = 0;
2109 len = 5;
2113 len = 3;
2117 len = 2;
2122 len = strlen(pdata);
2124 if (_Pickler_Write(self, pdata, len) < 0)
2361 Py_ssize_t len;
2369 len = 2;
2377 len = 5;
2382 len = 9;
2391 if (_Pickler_write_bytes(self, header, len, data, size, obj) < 0) {
2459 Py_ssize_t len;
2466 len = 9;
2468 if (_Pickler_write_bytes(self, header, len, data, size, obj) < 0) {
2551 view->len);
2555 view->len);
2652 Py_ssize_t len;
2677 len = 2;
2685 len = 5;
2690 len = 9;
2700 if (_Pickler_write_bytes(self, header, len, data, size, encoded) < 0) {
2745 /* A helper for save_tuple. Push the len elements in tuple t on the stack. */
2747 store_tuple_elements(PicklerObject *self, PyObject *t, Py_ssize_t len)
2751 assert(PyTuple_Size(t) == len);
2753 for (i = 0; i < len; i++) {
2774 Py_ssize_t len, i;
2782 if ((len = PyTuple_Size(obj)) < 0)
2785 if (len == 0) {
2790 len = 1;
2795 len = 2;
2797 if (_Pickler_Write(self, pdata, len) < 0)
2807 if (len <= 3 && self->proto >= 2) {
2809 if (store_tuple_elements(self, obj, len) < 0)
2813 /* pop the len elements */
2814 for (i = 0; i < len; i++)
2824 if (_Pickler_Write(self, len2opcode + len, 1) < 0)
2830 /* proto < 2 and len > 0, or proto >= 2 and len > 3.
2836 if (store_tuple_elements(self, obj, len) < 0)
2846 /* Note that we pop one more than len, to remove
2849 for (i = 0; i <= len; i++)
3048 Py_ssize_t len;
3057 len = 1;
3062 len = 2;
3065 if (_Pickler_Write(self, header, len) < 0)
3069 if ((len = PyList_Size(obj)) < 0)
3075 if (len != 0) {
3265 /* Special-case len(d) == 1 to save space. */
3324 Py_ssize_t len;
3334 len = 1;
3339 len = 2;
3342 if (_Pickler_Write(self, header, len) < 0)
5168 Py_ssize_t len;
5171 if ((len = _Unpickler_Readline(self, &s)) < 0)
5173 if (len < 2)
5194 if (len == 3 && (x == 0 || x == 1)) {
5326 Py_ssize_t len;
5328 if ((len = _Unpickler_Readline(self, &s)) < 0)
5330 if (len < 2)
5333 /* s[len-2] will usually be 'L' (and s[len-1] is '\n'); we need to remove
5337 if (s[len-2] == 'L')
5338 s[len-2] = '\0';
5391 Py_ssize_t len;
5394 if ((len = _Unpickler_Readline(self, &s)) < 0)
5396 if (len < 2)
5441 Py_ssize_t len;
5444 if ((len = _Unpickler_Readline(self, &s)) < 0)
5447 len--;
5449 if (len >= 2 && s[0] == s[len - 1] && (s[0] == '\'' || s[0] == '"')) {
5451 len -= 2;
5459 assert(len >= 0);
5463 bytes = PyBytes_DecodeEscape(p, len, NULL, 0, NULL);
5611 Py_ssize_t len = Py_SIZE(self->stack);
5612 if (len <= self->stack->fence) {
5616 PyObject *obj = self->stack->data[len - 1];
5624 self->stack->data[len - 1] = view;
5638 Py_ssize_t len;
5641 if ((len = _Unpickler_Readline(self, &s)) < 0)
5643 if (len < 1)
5646 str = PyUnicode_DecodeRawUnicodeEscape(s, len - 1, NULL);
5684 load_counted_tuple(UnpicklerObject *self, Py_ssize_t len)
5688 if (Py_SIZE(self->stack) < len)
5691 tuple = Pdata_poptuple(self->stack, Py_SIZE(self->stack) - len);
5871 Py_ssize_t len;
5877 if ((len = _Unpickler_Readline(self, &s)) < 0)
5879 if (len < 2)
5885 module_name = PyUnicode_DecodeASCII(s, len - 1, "strict");
5889 if ((len = _Unpickler_Readline(self, &s)) >= 0) {
5890 if (len < 2) {
5894 class_name = PyUnicode_DecodeASCII(s, len - 1, "strict");
5998 Py_ssize_t len;
6001 if ((len = _Unpickler_Readline(self, &s)) < 0)
6003 if (len < 2)
6005 module_name = PyUnicode_DecodeUTF8(s, len - 1, "strict");
6009 if ((len = _Unpickler_Readline(self, &s)) >= 0) {
6010 if (len < 2) {
6014 global_name = PyUnicode_DecodeUTF8(s, len - 1, "strict");
6058 Py_ssize_t len;
6062 if ((len = _Unpickler_Readline(self, &s)) < 0)
6064 if (len < 1)
6067 pid = PyUnicode_DecodeASCII(s, len - 1, "strict");
6124 Py_ssize_t len = Py_SIZE(self->stack);
6133 if (self->num_marks > 0 && self->marks[self->num_marks - 1] == len) {
6138 } else if (len <= self->stack->fence)
6141 len--;
6142 Py_DECREF(self->stack->data[len]);
6143 Py_SET_SIZE(self->stack, len);
6165 Py_ssize_t len = Py_SIZE(self->stack);
6167 if (len <= self->stack->fence)
6169 last = self->stack->data[len - 1];
6179 Py_ssize_t len;
6182 if ((len = _Unpickler_Readline(self, &s)) < 0)
6184 if (len < 2)
6360 Py_ssize_t len;
6363 if ((len = _Unpickler_Readline(self, &s)) < 0)
6365 if (len < 2)
6448 Py_ssize_t len, i;
6450 len = Py_SIZE(self->stack);
6451 if (x > len || x <= self->stack->fence)
6453 if (len == x) /* nothing to do */
6497 for (i = x; i < len; i++) {
6538 Py_ssize_t len, i;
6541 len = Py_SIZE(self->stack);
6542 if (x > len || x <= self->stack->fence)
6544 if (len == x) /* nothing to do */
6546 if ((len - x) % 2 != 0) {
6558 for (i = x + 1; i < len; i += 2) {
6590 Py_ssize_t mark, len, i;
6595 len = Py_SIZE(self->stack);
6596 if (mark > len || mark <= self->stack->fence)
6598 if (len == mark) /* nothing to do */
6621 for (i = mark; i < len; i++) {