Lines Matching refs:len

28 #define SMART_STR_NEW_LEN(len) \  argument
29 (ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STR_OVERHEAD, SMART_STR_PAGE) - SMART_STR_OVERHEAD)
31 ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len) in smart_str_erealloc() argument
34 str->a = len <= SMART_STR_START_LEN in smart_str_erealloc()
36 : SMART_STR_NEW_LEN(len); in smart_str_erealloc()
40 str->a = SMART_STR_NEW_LEN(len); in smart_str_erealloc()
45 ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len) in smart_str_realloc() argument
48 str->a = len <= SMART_STR_START_LEN in smart_str_realloc()
50 : SMART_STR_NEW_LEN(len); in smart_str_realloc()
54 str->a = SMART_STR_NEW_LEN(len); in smart_str_realloc()
65 size_t i, len = l; in zend_compute_escaped_string_len() local
70 len += 1; in zend_compute_escaped_string_len()
72 len += 3; in zend_compute_escaped_string_len()
75 return len; in zend_compute_escaped_string_len()
80 size_t i, len = zend_compute_escaped_string_len(s, l); in smart_str_append_escaped() local
82 smart_str_alloc(str, len, 0); in smart_str_append_escaped()
84 ZSTR_LEN(str->s) += len; in smart_str_append_escaped()
129 ZEND_API void ZEND_FASTCALL _smart_string_alloc_persistent(smart_string *str, size_t len) in _smart_string_alloc_persistent() argument
132 str->len = 0; in _smart_string_alloc_persistent()
133 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc_persistent()
136 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
140 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc_persistent()
143 len += str->len; in _smart_string_alloc_persistent()
144 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
149 ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) in _smart_string_alloc() argument
152 str->len = 0; in _smart_string_alloc()
153 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc()
157 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
166 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc()
169 len += str->len; in _smart_string_alloc()
170 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
171 str->c = erealloc2(str->c, str->a + 1, str->len); in _smart_string_alloc()