Lines Matching refs:str
29 typedef zend_string *(ZEND_FASTCALL *zend_new_interned_string_func_t)(zend_string *str);
30 typedef zend_string *(ZEND_FASTCALL *zend_string_init_interned_func_t)(const char *str, size_t size…
31 typedef zend_string *(ZEND_FASTCALL *zend_string_init_existing_interned_func_t)(const char *str, si…
38 ZEND_API zend_ulong ZEND_FASTCALL zend_string_hash_func(zend_string *str);
39 ZEND_API zend_ulong ZEND_FASTCALL zend_hash_func(const char *str, size_t len);
40 ZEND_API zend_string* ZEND_FASTCALL zend_interned_string_find_permanent(zend_string *str);
78 #define STR_ALLOCA_ALLOC(str, _len, use_heap) ZSTR_ALLOCA_ALLOC(str, _len, use_heap) in END_EXTERN_C() argument
79 #define STR_ALLOCA_INIT(str, s, len, use_heap) ZSTR_ALLOCA_INIT(str, s, len, use_heap) in END_EXTERN_C() argument
80 #define STR_ALLOCA_FREE(str, use_heap) ZSTR_ALLOCA_FREE(str, use_heap) in END_EXTERN_C() argument
119 #define ZSTR_ALLOCA_ALLOC(str, _len, use_heap) do { \ argument
120 …(str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE_EX(_ZSTR_STRUCT_SIZE(_len), 8), (use_heap));…
121 GC_SET_REFCOUNT(str, 1); \
122 GC_TYPE_INFO(str) = GC_STRING; \
123 ZSTR_H(str) = 0; \
124 ZSTR_LEN(str) = _len; \
127 #define ZSTR_ALLOCA_INIT(str, s, len, use_heap) do { \ argument
128 ZSTR_ALLOCA_ALLOC(str, len, use_heap); \
129 memcpy(ZSTR_VAL(str), (s), (len)); \
130 ZSTR_VAL(str)[(len)] = '\0'; \
133 #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) argument
196 static zend_always_inline zend_string *zend_string_init(const char *str, size_t len, bool persisten… in zend_string_init() argument
200 memcpy(ZSTR_VAL(ret), str, len); in zend_string_init()
205 static zend_always_inline zend_string *zend_string_init_fast(const char *str, size_t len) in zend_string_init_fast() argument
208 return zend_string_init(str, len, 0); in zend_string_init_fast()
212 return ZSTR_CHAR((zend_uchar) *str); in zend_string_init_fast()
397 #define zend_string_equals_literal_ci(str, c) \ argument
398 …(ZSTR_LEN(str) == sizeof("" c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), s…
400 #define zend_string_equals_literal(str, literal) \ argument
401 zend_string_equals_cstr(str, "" literal, sizeof(literal) - 1)
403 static zend_always_inline bool zend_string_starts_with_cstr(const zend_string *str, const char *pre… in zend_string_starts_with_cstr() argument
405 return ZSTR_LEN(str) >= prefix_length && !memcmp(ZSTR_VAL(str), prefix, prefix_length); in zend_string_starts_with_cstr()
408 static zend_always_inline bool zend_string_starts_with(const zend_string *str, const zend_string *p… in zend_string_starts_with() argument
410 return zend_string_starts_with_cstr(str, ZSTR_VAL(prefix), ZSTR_LEN(prefix)); in zend_string_starts_with()
413 #define zend_string_starts_with_literal(str, prefix) \ argument
414 zend_string_starts_with_cstr(str, prefix, strlen(prefix))
416 static zend_always_inline bool zend_string_starts_with_cstr_ci(const zend_string *str, const char *… in zend_string_starts_with_cstr_ci() argument
418 return ZSTR_LEN(str) >= prefix_length && !strncasecmp(ZSTR_VAL(str), prefix, prefix_length); in zend_string_starts_with_cstr_ci()
421 static zend_always_inline bool zend_string_starts_with_ci(const zend_string *str, const zend_string… in zend_string_starts_with_ci() argument
423 return zend_string_starts_with_cstr_ci(str, ZSTR_VAL(prefix), ZSTR_LEN(prefix)); in zend_string_starts_with_ci()
426 #define zend_string_starts_with_literal_ci(str, prefix) \ argument
427 zend_string_starts_with_cstr_ci(str, prefix, strlen(prefix))
462 static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size_t len) in zend_inline_hash_func() argument
468 for (; len >= 8; len -= 8, str += 8) { in zend_inline_hash_func()
474 memcpy(&chunk, str, sizeof(chunk)); in zend_inline_hash_func()
490 str[0] * Z_L(33 * 33 * 33) + in zend_inline_hash_func()
491 str[1] * Z_L(33 * 33) + in zend_inline_hash_func()
492 str[2] * Z_L(33) + in zend_inline_hash_func()
493 str[3]; in zend_inline_hash_func()
496 str[4] * Z_L(33 * 33 * 33) + in zend_inline_hash_func()
497 str[5] * Z_L(33 * 33) + in zend_inline_hash_func()
498 str[6] * Z_L(33) + in zend_inline_hash_func()
499 str[7]; in zend_inline_hash_func()
505 str[0] * Z_L(33 * 33 * 33) + in zend_inline_hash_func()
506 str[1] * Z_L(33 * 33) + in zend_inline_hash_func()
507 str[2] * Z_L(33) + in zend_inline_hash_func()
508 str[3]; in zend_inline_hash_func()
510 str += 4; in zend_inline_hash_func()
516 str[0] * Z_L(33 * 33) + in zend_inline_hash_func()
517 str[1] * Z_L(33) + in zend_inline_hash_func()
518 str[2]; in zend_inline_hash_func()
522 str[0] * Z_L(33) + in zend_inline_hash_func()
523 str[1]; in zend_inline_hash_func()
526 hash = hash * Z_L(33) + *str; in zend_inline_hash_func()
531 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
532 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
533 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
534 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
535 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
536 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
537 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
538 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func()
541 case 7: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
542 case 6: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
543 case 5: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
544 case 4: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
545 case 3: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
546 case 2: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func()
547 case 1: hash = ((hash << 5) + hash) + *str++; break; in zend_inline_hash_func()
644 #define _ZEND_STR_ID(id, str) id, argument