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()
127 ZEND_API void ZEND_FASTCALL _smart_string_alloc_persistent(smart_string *str, size_t len) in _smart_string_alloc_persistent() argument
130 str->len = 0; in _smart_string_alloc_persistent()
131 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc_persistent()
134 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
138 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc_persistent()
141 len += str->len; in _smart_string_alloc_persistent()
142 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc_persistent()
147 ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) in _smart_string_alloc() argument
150 str->len = 0; in _smart_string_alloc()
151 if (len <= SMART_STRING_START_LEN) { in _smart_string_alloc()
155 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
164 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc()
167 len += str->len; in _smart_string_alloc()
168 …str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OV… in _smart_string_alloc()
169 str->c = erealloc2(str->c, str->a + 1, str->len); in _smart_string_alloc()