Lines Matching refs:len

57 		((smart_string *)(src))->len, (what));
65 #define smart_string_appendl(str, src, len) \ argument
66 smart_string_appendl_ex((str), (src), (len), 0)
74 static zend_always_inline size_t smart_string_alloc(smart_string *str, size_t len, zend_bool persis… in smart_string_alloc() argument
76 str->len = 0; in smart_string_alloc()
77 str->a = len < SMART_STRING_START_SIZE in smart_string_alloc()
79 : len + SMART_STRING_PREALLOC; in smart_string_alloc()
81 return len; in smart_string_alloc()
83 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in smart_string_alloc()
86 len += str->len; in smart_string_alloc()
87 if (UNEXPECTED(len >= str->a)) { in smart_string_alloc()
88 str->a = len + SMART_STRING_PREALLOC; in smart_string_alloc()
92 return len; in smart_string_alloc()
100 str->a = str->len = 0; in smart_string_free_ex()
105 str->c[str->len] = '\0'; in smart_string_0()
110 dest->len = smart_string_alloc(dest, 1, persistent); in smart_string_appendc_ex()
111 dest->c[dest->len - 1] = ch; in smart_string_appendc_ex()
114 …e void smart_string_appendl_ex(smart_string *dest, const char *str, size_t len, zend_bool persiste… in smart_string_appendl_ex() argument
115 size_t new_len = smart_string_alloc(dest, len, persistent); in smart_string_appendl_ex()
116 memcpy(dest->c + dest->len, str, len); in smart_string_appendl_ex()
117 dest->len = new_len; in smart_string_appendl_ex()
133 static zend_always_inline void smart_string_setl(smart_string *dest, char *src, size_t len) { in smart_string_setl() argument
134 dest->len = len; in smart_string_setl()
135 dest->a = len + 1; in smart_string_setl()