/external/python/cpython2/Objects/ |
D | bufferobject.c | 522 Py_ssize_t start, stop, step, slicelength, cur, i; in buffer_subscript() local 529 slicelength = _PySlice_AdjustIndices(size, &start, &stop, step); in buffer_subscript() 530 if (slicelength <= 0) in buffer_subscript() 538 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript() 543 for (cur = start, i = 0; i < slicelength; in buffer_subscript() 549 slicelength); in buffer_subscript() 718 Py_ssize_t start, stop, step, slicelength; in buffer_ass_subscript() local 725 slicelength = _PySlice_AdjustIndices(selfsize, &start, &stop, step); in buffer_ass_subscript() 729 if (othersize != slicelength) { in buffer_ass_subscript() 736 if (slicelength == 0) in buffer_ass_subscript() [all …]
|
D | listobject.c | 2557 Py_ssize_t start, stop, step, slicelength, cur, i; in list_subscript() local 2565 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_subscript() 2568 if (slicelength <= 0) { in list_subscript() 2575 result = PyList_New(slicelength); in list_subscript() 2580 for (cur = start, i = 0; i < slicelength; in list_subscript() 2610 Py_ssize_t start, stop, step, slicelength; in list_ass_subscript() local 2615 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_ass_subscript() 2633 if (slicelength <= 0) in list_ass_subscript() 2638 start = stop + step*(slicelength - 1) - 1; in list_ass_subscript() 2642 assert((size_t)slicelength <= in list_ass_subscript() [all …]
|
D | tupleobject.c | 710 Py_ssize_t start, stop, step, slicelength, cur, i; in tuplesubscript() local 718 slicelength = _PySlice_AdjustIndices(PyTuple_GET_SIZE(self), &start, in tuplesubscript() 721 if (slicelength <= 0) { in tuplesubscript() 725 slicelength == PyTuple_GET_SIZE(self) && in tuplesubscript() 731 result = PyTuple_New(slicelength); in tuplesubscript() 736 for (cur = start, i = 0; i < slicelength; in tuplesubscript()
|
D | memoryobject.c | 585 Py_ssize_t start, stop, step, slicelength; in memory_subscript() local 590 slicelength = _PySlice_AdjustIndices(get_shape0(view), &start, &stop, in memory_subscript() 609 newview.len = slicelength * newview.itemsize; in memory_subscript() 612 newview.shape[0] = slicelength; in memory_subscript()
|
D | sliceobject.c | 225 Py_ssize_t *slicelength) in PySlice_GetIndicesEx() argument 229 *slicelength = _PySlice_AdjustIndices(length, start, stop, *step); in PySlice_GetIndicesEx()
|
D | bytearrayobject.c | 457 Py_ssize_t start, stop, step, slicelength, cur, i; in bytearray_subscript() local 461 slicelength = _PySlice_AdjustIndices(PyByteArray_GET_SIZE(self), in bytearray_subscript() 464 if (slicelength <= 0) in bytearray_subscript() 468 slicelength); in bytearray_subscript() 472 char *result_buf = (char *)PyMem_Malloc(slicelength); in bytearray_subscript() 478 for (cur = start, i = 0; i < slicelength; in bytearray_subscript() 482 result = PyByteArray_FromStringAndSize(result_buf, slicelength); in bytearray_subscript()
|
D | bytesobject.c | 1683 Py_ssize_t start, stop, step, slicelength, cur, i; in bytes_subscript() local 1691 slicelength = PySlice_AdjustIndices(PyBytes_GET_SIZE(self), &start, in bytes_subscript() 1694 if (slicelength <= 0) { in bytes_subscript() 1698 slicelength == PyBytes_GET_SIZE(self) && in bytes_subscript() 1706 slicelength); in bytes_subscript() 1710 result = PyBytes_FromStringAndSize(NULL, slicelength); in bytes_subscript() 1715 for (cur = start, i = 0; i < slicelength; in bytes_subscript()
|
D | stringobject.c | 1314 Py_ssize_t start, stop, step, slicelength, cur, i; in string_subscript() local 1322 slicelength = _PySlice_AdjustIndices(PyString_GET_SIZE(self), &start, in string_subscript() 1325 if (slicelength <= 0) { in string_subscript() 1329 slicelength == PyString_GET_SIZE(self) && in string_subscript() 1337 slicelength); in string_subscript() 1341 result_buf = (char *)PyMem_Malloc(slicelength); in string_subscript() 1345 for (cur = start, i = 0; i < slicelength; in string_subscript() 1351 slicelength); in string_subscript()
|
D | unicodeobject.c | 8006 Py_ssize_t start, stop, step, slicelength, cur, i; in unicode_subscript() local 8014 slicelength = _PySlice_AdjustIndices(PyUnicode_GET_SIZE(self), &start, in unicode_subscript() 8017 if (slicelength <= 0) { in unicode_subscript() 8019 } else if (start == 0 && step == 1 && slicelength == self->length && in unicode_subscript() 8024 return PyUnicode_FromUnicode(self->str + start, slicelength); in unicode_subscript() 8027 result_buf = (Py_UNICODE *)PyObject_MALLOC(slicelength* in unicode_subscript() 8033 for (cur = start, i = 0; i < slicelength; cur += step, i++) { in unicode_subscript() 8037 result = PyUnicode_FromUnicode(result_buf, slicelength); in unicode_subscript()
|
/external/python/cpython2/Modules/ |
D | arraymodule.c | 1699 Py_ssize_t start, stop, step, slicelength, cur, i; in array_subscr() local 1707 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_subscr() 1710 if (slicelength <= 0) { in array_subscr() 1715 slicelength, self->ob_descr); in array_subscr() 1720 slicelength * itemsize); in array_subscr() 1724 result = newarrayobject(&Arraytype, slicelength, self->ob_descr); in array_subscr() 1729 for (cur = start, i = 0; i < slicelength; in array_subscr() 1749 Py_ssize_t start, stop, step, slicelength, needed; in array_ass_subscr() local 1770 slicelength = 1; in array_ass_subscr() 1779 slicelength = _PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_ass_subscr() [all …]
|
/external/python/cpython3/Modules/ |
D | arraymodule.c | 2346 Py_ssize_t start, stop, step, slicelength, cur, i; in array_subscr() local 2354 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_subscr() 2357 if (slicelength <= 0) { in array_subscr() 2362 slicelength, self->ob_descr); in array_subscr() 2367 slicelength * itemsize); in array_subscr() 2371 result = newarrayobject(&Arraytype, slicelength, self->ob_descr); in array_subscr() 2376 for (cur = start, i = 0; i < slicelength; in array_subscr() 2396 Py_ssize_t start, stop, step, slicelength, needed; in array_ass_subscr() local 2417 slicelength = 1; in array_ass_subscr() 2426 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_ass_subscr() [all …]
|
D | _testbuffer.c | 1714 Py_ssize_t start, stop, step, slicelength; in init_slice() local 1719 slicelength = PySlice_AdjustIndices(base->shape[dim], &start, &stop, step); in init_slice() 1734 base->shape[dim] = slicelength; in init_slice()
|
/external/python/cpython3/Doc/c-api/ |
D | slice.rst | 46 … Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength) 50 length *length*, and store the length of the slice in *slicelength*. Out 61 if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) < 0) { 70 slicelength = PySlice_AdjustIndices(length, &start, &stop, step);
|
/external/python/cpython2/Doc/c-api/ |
D | slice.rst | 52 … 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/cpython3/Objects/ |
D | listobject.c | 2725 Py_ssize_t start, stop, step, slicelength, cur, i; in list_subscript() local 2733 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_subscript() 2736 if (slicelength <= 0) { in list_subscript() 2743 result = PyList_New(slicelength); in list_subscript() 2748 for (cur = start, i = 0; i < slicelength; in list_subscript() 2778 Py_ssize_t start, stop, step, slicelength; in list_ass_subscript() local 2783 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in list_ass_subscript() 2802 if (slicelength <= 0) in list_ass_subscript() 2807 start = stop + step*(slicelength - 1) - 1; in list_ass_subscript() 2812 PyMem_MALLOC(slicelength*sizeof(PyObject*)); in list_ass_subscript() [all …]
|
D | tupleobject.c | 733 Py_ssize_t start, stop, step, slicelength, cur, i; in tuplesubscript() local 741 slicelength = PySlice_AdjustIndices(PyTuple_GET_SIZE(self), &start, in tuplesubscript() 744 if (slicelength <= 0) { in tuplesubscript() 748 slicelength == PyTuple_GET_SIZE(self) && in tuplesubscript() 754 result = PyTuple_New(slicelength); in tuplesubscript() 759 for (cur = start, i = 0; i < slicelength; in tuplesubscript()
|
D | sliceobject.c | 287 Py_ssize_t *slicelength) in PySlice_GetIndicesEx() argument 291 *slicelength = PySlice_AdjustIndices(length, start, stop, *step); in PySlice_GetIndicesEx()
|
D | bytearrayobject.c | 423 Py_ssize_t start, stop, step, slicelength, cur, i; in bytearray_subscript() local 427 slicelength = PySlice_AdjustIndices(PyByteArray_GET_SIZE(self), in bytearray_subscript() 430 if (slicelength <= 0) in bytearray_subscript() 434 PyByteArray_AS_STRING(self) + start, slicelength); in bytearray_subscript() 441 result = PyByteArray_FromStringAndSize(NULL, slicelength); in bytearray_subscript() 446 for (cur = start, i = 0; i < slicelength; in bytearray_subscript()
|
D | bytesobject.c | 1676 Py_ssize_t start, stop, step, slicelength, cur, i; in bytes_subscript() local 1684 slicelength = PySlice_AdjustIndices(PyBytes_GET_SIZE(self), &start, in bytes_subscript() 1687 if (slicelength <= 0) { in bytes_subscript() 1691 slicelength == PyBytes_GET_SIZE(self) && in bytes_subscript() 1699 slicelength); in bytes_subscript() 1703 result = PyBytes_FromStringAndSize(NULL, slicelength); in bytes_subscript() 1708 for (cur = start, i = 0; i < slicelength; in bytes_subscript()
|
D | memoryobject.c | 2288 Py_ssize_t start, stop, step, slicelength; in init_slice() local 2293 slicelength = PySlice_AdjustIndices(base->shape[dim], &start, &stop, step); in init_slice() 2308 base->shape[dim] = slicelength; in init_slice()
|
D | unicodeobject.c | 13978 Py_ssize_t start, stop, step, slicelength, cur, i; in unicode_subscript() local 13987 slicelength = PySlice_AdjustIndices(PyUnicode_GET_LENGTH(self), in unicode_subscript() 13990 if (slicelength <= 0) { in unicode_subscript() 13993 slicelength == PyUnicode_GET_LENGTH(self)) { in unicode_subscript() 13997 start, start + slicelength); in unicode_subscript() 14005 for (cur = start, i = 0; i < slicelength; cur += step, i++) { in unicode_subscript() 14016 result = PyUnicode_New(slicelength, max_char); in unicode_subscript() 14022 for (cur = start, i = 0; i < slicelength; cur += step, i++) { in unicode_subscript()
|
/external/protobuf/python/google/protobuf/pyext/ |
D | repeated_scalar_container.cc | 295 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()
|
D | repeated_composite_container.cc | 264 Py_ssize_t slicelength; in AssignSubscript() local 271 length, &from, &to, &step, &slicelength) == -1) { in AssignSubscript()
|
/external/python/cpython2/Include/ |
D | sliceobject.h | 39 Py_ssize_t *step, Py_ssize_t *slicelength);
|
/external/python/cpython3/Include/ |
D | sliceobject.h | 45 Py_ssize_t *step, Py_ssize_t *slicelength) Py_DEPRECATED(3.7);
|