Lines Matching refs:str

28 ZEND_API extern zend_string *(*zend_new_interned_string)(zend_string *str);
32 ZEND_API zend_ulong zend_hash_func(const char *str, size_t len);
50 #define STR_ALLOCA_ALLOC(str, _len, use_heap) ZSTR_ALLOCA_ALLOC(str, _len, use_heap) in END_EXTERN_C() argument
51 #define STR_ALLOCA_INIT(str, s, len, use_heap) ZSTR_ALLOCA_INIT(str, s, len, use_heap) in END_EXTERN_C() argument
52 #define STR_ALLOCA_FREE(str, use_heap) ZSTR_ALLOCA_FREE(str, use_heap) in END_EXTERN_C() argument
64 #define ZSTR_ALLOCA_ALLOC(str, _len, use_heap) do { \ in END_EXTERN_C() argument
65 …(str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE_EX(_ZSTR_STRUCT_SIZE(_len), 8), (use_heap));… in END_EXTERN_C()
66 GC_REFCOUNT(str) = 1; \ in END_EXTERN_C()
67 GC_TYPE_INFO(str) = IS_STRING; \ in END_EXTERN_C()
68 zend_string_forget_hash_val(str); \ in END_EXTERN_C()
69 ZSTR_LEN(str) = _len; \ in END_EXTERN_C()
72 #define ZSTR_ALLOCA_INIT(str, s, len, use_heap) do { \ argument
73 ZSTR_ALLOCA_ALLOC(str, len, use_heap); \
74 memcpy(ZSTR_VAL(str), (s), (len)); \
75 ZSTR_VAL(str)[(len)] = '\0'; \
78 #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) argument
155 static zend_always_inline zend_string *zend_string_init(const char *str, size_t len, int persistent) in zend_string_init() argument
159 memcpy(ZSTR_VAL(ret), str, len); in zend_string_init()
285 #define zend_string_equals_literal_ci(str, c) \ argument
286 …(ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), size…
288 #define zend_string_equals_literal(str, literal) \ argument
289 (ZSTR_LEN(str) == sizeof(literal)-1 && !memcmp(ZSTR_VAL(str), literal, sizeof(literal) - 1))
324 static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size_t len) in zend_inline_hash_func() argument
330 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
331 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
332 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
333 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
334 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
335 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
336 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
337 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
340 case 7: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
341 case 6: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
342 case 5: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
343 case 4: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
344 case 3: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
345 case 2: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
346 case 1: hash = ((hash << 5) + hash) + *str++; break; in zend_inline_hash_func()
363 zend_string *str; in zend_interned_empty_string_init() local
365 str = zend_string_alloc(sizeof("")-1, 1); in zend_interned_empty_string_init()
366 ZSTR_VAL(str)[0] = '\000'; in zend_interned_empty_string_init() local
369 *s = zend_new_interned_string(str); in zend_interned_empty_string_init()
371 zend_string_hash_val(str); in zend_interned_empty_string_init()
372 GC_FLAGS(str) |= IS_STR_INTERNED; in zend_interned_empty_string_init()
373 *s = str; in zend_interned_empty_string_init()