Lines Matching refs:len

33 ZEND_API zend_ulong zend_hash_func(const char *str, size_t len);
52 #define ZSTR_LEN(zstr) (zstr)->len in END_EXTERN_C()
62 #define STR_ALLOCA_INIT(str, s, len, use_heap) ZSTR_ALLOCA_INIT(str, s, len, use_heap) in END_EXTERN_C() argument
75 #define _ZSTR_STRUCT_SIZE(len) (_ZSTR_HEADER_SIZE + len + 1) in END_EXTERN_C() argument
85 #define ZSTR_ALLOCA_INIT(str, s, len, use_heap) do { \ argument
86 ZSTR_ALLOCA_ALLOC(str, len, use_heap); \
87 memcpy(ZSTR_VAL(str), (s), (len)); \
88 ZSTR_VAL(str)[(len)] = '\0'; \
132 static zend_always_inline zend_string *zend_string_alloc(size_t len, int persistent) in zend_string_alloc() argument
134 …zend_string *ret = (zend_string *)pemalloc(ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persisten… in zend_string_alloc()
146 ZSTR_LEN(ret) = len; in zend_string_alloc()
168 static zend_always_inline zend_string *zend_string_init(const char *str, size_t len, int persistent) in zend_string_init() argument
170 zend_string *ret = zend_string_alloc(len, persistent); in zend_string_init()
172 memcpy(ZSTR_VAL(ret), str, len); in zend_string_init()
173 ZSTR_VAL(ret)[len] = '\0'; in zend_string_init()
177 static zend_always_inline zend_string *zend_string_init_interned(const char *str, size_t len, int p… in zend_string_init_interned() argument
179 zend_string *ret = zend_string_init(str, len, persistent); in zend_string_init_interned()
201 static zend_always_inline zend_string *zend_string_realloc(zend_string *s, size_t len, int persiste… in zend_string_realloc() argument
207 ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); in zend_string_realloc()
208 ZSTR_LEN(ret) = len; in zend_string_realloc()
215 ret = zend_string_alloc(len, persistent); in zend_string_realloc()
216 memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), MIN(len, ZSTR_LEN(s)) + 1); in zend_string_realloc()
220 static zend_always_inline zend_string *zend_string_extend(zend_string *s, size_t len, int persisten… in zend_string_extend() argument
224 ZEND_ASSERT(len >= ZSTR_LEN(s)); in zend_string_extend()
227 ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); in zend_string_extend()
228 ZSTR_LEN(ret) = len; in zend_string_extend()
235 ret = zend_string_alloc(len, persistent); in zend_string_extend()
240 static zend_always_inline zend_string *zend_string_truncate(zend_string *s, size_t len, int persist… in zend_string_truncate() argument
244 ZEND_ASSERT(len <= ZSTR_LEN(s)); in zend_string_truncate()
247 ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); in zend_string_truncate()
248 ZSTR_LEN(ret) = len; in zend_string_truncate()
255 ret = zend_string_alloc(len, persistent); in zend_string_truncate()
256 memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), len + 1); in zend_string_truncate()
344 static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size_t len) in zend_inline_hash_func() argument
349 for (; len >= 8; len -= 8) { in zend_inline_hash_func()
359 switch (len) { in zend_inline_hash_func()