Lines Matching refs:self_len
1594 Py_ssize_t self_len, result_len; in replace_interleave() local
1598 self_len = PyByteArray_GET_SIZE(self); in replace_interleave()
1602 if (maxcount <= self_len) { in replace_interleave()
1607 count = self_len + 1; in replace_interleave()
1613 if (to_len > (PY_SSIZE_T_MAX - self_len) / count) { in replace_interleave()
1618 result_len = count * to_len + self_len; in replace_interleave()
1640 Py_MEMCPY(result_s, self_s, self_len-i); in replace_interleave()
1653 Py_ssize_t self_len, result_len; in replace_delete_single_character() local
1657 self_len = PyByteArray_GET_SIZE(self); in replace_delete_single_character()
1660 count = countchar(self_s, self_len, from_c, maxcount); in replace_delete_single_character()
1665 result_len = self_len - count; /* from_len == 1 */ in replace_delete_single_character()
1674 end = self_s + self_len; in replace_delete_single_character()
1697 Py_ssize_t self_len, result_len; in replace_delete_substring() local
1701 self_len = PyByteArray_GET_SIZE(self); in replace_delete_substring()
1704 count = stringlib_count(self_s, self_len, in replace_delete_substring()
1713 result_len = self_len - (count * from_len); in replace_delete_substring()
1723 end = self_s + self_len; in replace_delete_substring()
1748 Py_ssize_t self_len; in replace_single_character_in_place() local
1753 self_len = PyByteArray_GET_SIZE(self); in replace_single_character_in_place()
1755 next = findchar(self_s, self_len, from_c); in replace_single_character_in_place()
1763 result = (PyByteArrayObject *) PyByteArray_FromStringAndSize(NULL, self_len); in replace_single_character_in_place()
1767 Py_MEMCPY(result_s, self_s, self_len); in replace_single_character_in_place()
1773 end = result_s + self_len; in replace_single_character_in_place()
1795 Py_ssize_t self_len, offset; in replace_substring_in_place() local
1801 self_len = PyByteArray_GET_SIZE(self); in replace_substring_in_place()
1803 offset = stringlib_find(self_s, self_len, in replace_substring_in_place()
1812 result = (PyByteArrayObject *) PyByteArray_FromStringAndSize(NULL, self_len); in replace_substring_in_place()
1816 Py_MEMCPY(result_s, self_s, self_len); in replace_substring_in_place()
1822 end = result_s + self_len; in replace_substring_in_place()
1846 Py_ssize_t self_len, result_len; in replace_single_character() local
1851 self_len = PyByteArray_GET_SIZE(self); in replace_single_character()
1853 count = countchar(self_s, self_len, from_c, maxcount); in replace_single_character()
1862 if (to_len - 1 > (PY_SSIZE_T_MAX - self_len) / count) { in replace_single_character()
1866 result_len = self_len + count * (to_len - 1); in replace_single_character()
1874 end = self_s + self_len; in replace_single_character()
1909 Py_ssize_t self_len, result_len; in replace_substring() local
1914 self_len = PyByteArray_GET_SIZE(self); in replace_substring()
1916 count = stringlib_count(self_s, self_len, in replace_substring()
1928 if (to_len - from_len > (PY_SSIZE_T_MAX - self_len) / count) { in replace_substring()
1932 result_len = self_len + count * (to_len - from_len); in replace_substring()
1940 end = self_s + self_len; in replace_substring()