Lines Matching refs:str
49 ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len);
50 ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len);
51 ZEND_API void ZEND_FASTCALL smart_str_append_escaped(smart_str *str, const char *s, size_t l);
57 static zend_always_inline size_t smart_str_alloc(smart_str *str, size_t len, zend_bool persistent) { in END_EXTERN_C()
58 if (UNEXPECTED(!str->s)) { in END_EXTERN_C()
61 len += ZSTR_LEN(str->s); in END_EXTERN_C()
62 if (UNEXPECTED(len >= str->a)) { in END_EXTERN_C()
65 smart_str_realloc(str, len); in END_EXTERN_C()
67 smart_str_erealloc(str, len); in END_EXTERN_C()
81 static zend_always_inline void smart_str_free_ex(smart_str *str, zend_bool persistent) { in smart_str_free_ex() argument
82 if (str->s) { in smart_str_free_ex()
83 zend_string_release_ex(str->s, persistent); in smart_str_free_ex()
84 str->s = NULL; in smart_str_free_ex()
86 str->a = 0; in smart_str_free_ex()
89 static zend_always_inline void smart_str_0(smart_str *str) { in smart_str_0() argument
90 if (str->s) { in smart_str_0()
91 ZSTR_VAL(str->s)[ZSTR_LEN(str->s)] = '\0'; in smart_str_0() local
95 static zend_always_inline size_t smart_str_get_len(smart_str *str) { in smart_str_get_len() argument
96 return str->s ? ZSTR_LEN(str->s) : 0; in smart_str_get_len()
99 static zend_always_inline zend_string *smart_str_extract(smart_str *str) { in smart_str_extract() argument
100 if (str->s) { in smart_str_extract()
102 smart_str_0(str); in smart_str_extract()
103 res = str->s; in smart_str_extract()
104 str->s = NULL; in smart_str_extract()
117 static zend_always_inline void smart_str_appendl_ex(smart_str *dest, const char *str, size_t len, z… in smart_str_appendl_ex() argument
119 memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); in smart_str_appendl_ex()