Home
last modified time | relevance | path

Searched refs:slicelength (Results 1 – 13 of 13) sorted by relevance

/external/python/cpython2/Objects/
Dbufferobject.c514 Py_ssize_t start, stop, step, slicelength, cur, i; in buffer_subscript() local
517 &start, &stop, &step, &slicelength) < 0) { in buffer_subscript()
521 if (slicelength <= 0) in buffer_subscript()
529 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript()
534 for (cur = start, i = 0; i < slicelength; in buffer_subscript()
540 slicelength); in buffer_subscript()
701 Py_ssize_t start, stop, step, slicelength; in buffer_ass_subscript() local
704 &start, &stop, &step, &slicelength) < 0) in buffer_ass_subscript()
710 if (othersize != slicelength) { in buffer_ass_subscript()
717 if (slicelength == 0) in buffer_ass_subscript()
[all …]
Dsliceobject.c135 Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength) in PySlice_GetIndicesEx() argument
180 *slicelength = 0; in PySlice_GetIndicesEx()
183 *slicelength = (*stop-*start+1)/(*step)+1; in PySlice_GetIndicesEx()
186 *slicelength = (*stop-*start-1)/(*step)+1; in PySlice_GetIndicesEx()
257 Py_ssize_t ilen, start, stop, step, slicelength; in slice_indices() local
266 &step, &slicelength) < 0) { in slice_indices()
Dlistobject.c2560 Py_ssize_t start, stop, step, slicelength, cur, i; in list_subscript() local
2566 &start, &stop, &step, &slicelength) < 0) { in list_subscript()
2570 if (slicelength <= 0) { in list_subscript()
2577 result = PyList_New(slicelength); in list_subscript()
2582 for (cur = start, i = 0; i < slicelength; in list_subscript()
2612 Py_ssize_t start, stop, step, slicelength; in list_ass_subscript() local
2615 &start, &stop, &step, &slicelength) < 0) { in list_ass_subscript()
2634 if (slicelength <= 0) in list_ass_subscript()
2639 start = stop + step*(slicelength - 1) - 1; in list_ass_subscript()
2643 assert((size_t)slicelength <= in list_ass_subscript()
[all …]
Dtupleobject.c713 Py_ssize_t start, stop, step, slicelength, cur, i; in tuplesubscript() local
720 &start, &stop, &step, &slicelength) < 0) { in tuplesubscript()
724 if (slicelength <= 0) { in tuplesubscript()
728 slicelength == PyTuple_GET_SIZE(self) && in tuplesubscript()
734 result = PyTuple_New(slicelength); in tuplesubscript()
739 for (cur = start, i = 0; i < slicelength; in tuplesubscript()
Dmemoryobject.c585 Py_ssize_t start, stop, step, slicelength; in memory_subscript() local
588 &start, &stop, &step, &slicelength) < 0) { in memory_subscript()
608 newview.len = slicelength * newview.itemsize; in memory_subscript()
611 newview.shape[0] = slicelength; in memory_subscript()
Dbytearrayobject.c437 Py_ssize_t start, stop, step, slicelength, cur, i; in bytearray_subscript() local
440 &start, &stop, &step, &slicelength) < 0) { in bytearray_subscript()
444 if (slicelength <= 0) in bytearray_subscript()
448 slicelength); in bytearray_subscript()
452 char *result_buf = (char *)PyMem_Malloc(slicelength); in bytearray_subscript()
458 for (cur = start, i = 0; i < slicelength; in bytearray_subscript()
462 result = PyByteArray_FromStringAndSize(result_buf, slicelength); in bytearray_subscript()
Dstringobject.c1308 Py_ssize_t start, stop, step, slicelength, cur, i; in string_subscript() local
1315 &start, &stop, &step, &slicelength) < 0) { in string_subscript()
1319 if (slicelength <= 0) { in string_subscript()
1323 slicelength == PyString_GET_SIZE(self) && in string_subscript()
1331 slicelength); in string_subscript()
1335 result_buf = (char *)PyMem_Malloc(slicelength); in string_subscript()
1339 for (cur = start, i = 0; i < slicelength; in string_subscript()
1345 slicelength); in string_subscript()
Dunicodeobject.c8011 Py_ssize_t start, stop, step, slicelength, cur, i; in unicode_subscript() local
8017 &start, &stop, &step, &slicelength) < 0) { in unicode_subscript()
8021 if (slicelength <= 0) { in unicode_subscript()
8023 } else if (start == 0 && step == 1 && slicelength == self->length && in unicode_subscript()
8028 return PyUnicode_FromUnicode(self->str + start, slicelength); in unicode_subscript()
8031 result_buf = (Py_UNICODE *)PyObject_MALLOC(slicelength* in unicode_subscript()
8037 for (cur = start, i = 0; i < slicelength; cur += step, i++) { in unicode_subscript()
8041 result = PyUnicode_FromUnicode(result_buf, slicelength); in unicode_subscript()
/external/python/cpython2/Modules/
Darraymodule.c1699 Py_ssize_t start, stop, step, slicelength, cur, i; in array_subscr() local
1705 &start, &stop, &step, &slicelength) < 0) { in array_subscr()
1709 if (slicelength <= 0) { in array_subscr()
1714 slicelength, self->ob_descr); in array_subscr()
1719 slicelength * itemsize); in array_subscr()
1723 result = newarrayobject(&Arraytype, slicelength, self->ob_descr); in array_subscr()
1728 for (cur = start, i = 0; i < slicelength; in array_subscr()
1748 Py_ssize_t start, stop, step, slicelength, needed; in array_ass_subscr() local
1769 slicelength = 1; in array_ass_subscr()
1777 &step, &slicelength) < 0) { in array_ass_subscr()
[all …]
/external/python/cpython2/Doc/c-api/
Dslice.rst52 … Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
56 length *length*, and store the length of the slice in *slicelength*. Out
66 :c:type:`int *` type for *start*, *stop*, *step*, and *slicelength*. This
/external/python/cpython2/Include/
Dsliceobject.h39 Py_ssize_t *step, Py_ssize_t *slicelength);
/external/protobuf/python/google/protobuf/pyext/
Drepeated_scalar_container.cc295 Py_ssize_t slicelength; in Subscript() local
311 length, &from, &to, &step, &slicelength) == -1) { in Subscript()
441 Py_ssize_t slicelength; in AssSubscript() local
464 length, &from, &to, &step, &slicelength) == -1) { in AssSubscript()
Drepeated_composite_container.cc264 Py_ssize_t slicelength; in AssignSubscript() local
271 length, &from, &to, &step, &slicelength) == -1) { in AssignSubscript()