Lines Matching refs:len
27 #define SMART_STR_NEW_LEN(len) \ argument
28 (ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STR_OVERHEAD, SMART_STR_PAGE) - SMART_STR_OVERHEAD)
30 ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len) in smart_str_erealloc() argument
33 str->a = len <= SMART_STR_START_LEN in smart_str_erealloc()
35 : SMART_STR_NEW_LEN(len); in smart_str_erealloc()
39 str->a = SMART_STR_NEW_LEN(len); in smart_str_erealloc()
44 ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len) in smart_str_realloc() argument
47 str->a = len <= SMART_STR_START_LEN in smart_str_realloc()
49 : SMART_STR_NEW_LEN(len); in smart_str_realloc()
53 str->a = SMART_STR_NEW_LEN(len); in smart_str_realloc()
64 size_t i, len = l; in zend_compute_escaped_string_len() local
69 len += 1; in zend_compute_escaped_string_len()
71 len += 3; in zend_compute_escaped_string_len()
74 return len; in zend_compute_escaped_string_len()
79 size_t i, len = zend_compute_escaped_string_len(s, l); in smart_str_append_escaped() local
81 smart_str_alloc(str, len, 0); in smart_str_append_escaped()
83 ZSTR_LEN(str->s) += len; in smart_str_append_escaped()
139 ZEND_API void ZEND_FASTCALL _smart_string_alloc_persistent(smart_string *str, size_t len) in _smart_string_alloc_persistent() argument
142 str->len = 0; in _smart_string_alloc_persistent()
143 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc_persistent()
146 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
150 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc_persistent()
153 len += str->len; in _smart_string_alloc_persistent()
154 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
159 ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) in _smart_string_alloc() argument
162 str->len = 0; in _smart_string_alloc()
163 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc()
167 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
176 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc()
179 len += str->len; in _smart_string_alloc()
180 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
181 str->c = erealloc2(str->c, str->a + 1, str->len); in _smart_string_alloc()