Lines Matching refs:len

26 #define SMART_STR_NEW_LEN(len) \  argument
27 (ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STR_OVERHEAD, SMART_STR_PAGE) - SMART_STR_OVERHEAD)
29 ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len) in smart_str_erealloc() argument
32 str->a = len <= SMART_STR_START_LEN in smart_str_erealloc()
34 : SMART_STR_NEW_LEN(len); in smart_str_erealloc()
38 str->a = SMART_STR_NEW_LEN(len); in smart_str_erealloc()
43 ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len) in smart_str_realloc() argument
46 str->a = len <= SMART_STR_START_LEN in smart_str_realloc()
48 : SMART_STR_NEW_LEN(len); in smart_str_realloc()
52 str->a = SMART_STR_NEW_LEN(len); in smart_str_realloc()
63 size_t i, len = l; in zend_compute_escaped_string_len() local
68 len += 1; in zend_compute_escaped_string_len()
70 len += 3; in zend_compute_escaped_string_len()
73 return len; in zend_compute_escaped_string_len()
78 size_t i, len = zend_compute_escaped_string_len(s, l); in smart_str_append_escaped() local
80 smart_str_alloc(str, len, 0); in smart_str_append_escaped()
82 ZSTR_LEN(str->s) += len; in smart_str_append_escaped()
138 ZEND_API void ZEND_FASTCALL _smart_string_alloc_persistent(smart_string *str, size_t len) in _smart_string_alloc_persistent() argument
141 str->len = 0; in _smart_string_alloc_persistent()
142 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc_persistent()
145 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
149 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc_persistent()
152 len += str->len; in _smart_string_alloc_persistent()
153 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
158 ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) in _smart_string_alloc() argument
161 str->len = 0; in _smart_string_alloc()
162 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc()
166 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
175 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc()
178 len += str->len; in _smart_string_alloc()
179 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
180 str->c = erealloc2(str->c, str->a + 1, str->len); in _smart_string_alloc()