Lines Matching refs:str

51 ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len);
52 ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len);
53 ZEND_API void ZEND_FASTCALL smart_str_append_escaped(smart_str *str, const char *s, size_t l);
59 static zend_always_inline size_t smart_str_alloc(smart_str *str, size_t len, zend_bool persistent) { in END_EXTERN_C()
60 if (UNEXPECTED(!str->s)) { in END_EXTERN_C()
63 len += ZSTR_LEN(str->s); in END_EXTERN_C()
64 if (UNEXPECTED(len >= str->a)) { in END_EXTERN_C()
67 smart_str_realloc(str, len); in END_EXTERN_C()
69 smart_str_erealloc(str, len); in END_EXTERN_C()
83 static zend_always_inline void smart_str_free_ex(smart_str *str, zend_bool persistent) { in smart_str_free_ex() argument
84 if (str->s) { in smart_str_free_ex()
85 zend_string_release_ex(str->s, persistent); in smart_str_free_ex()
86 str->s = NULL; in smart_str_free_ex()
88 str->a = 0; in smart_str_free_ex()
91 static zend_always_inline void smart_str_0(smart_str *str) { in smart_str_0() argument
92 if (str->s) { in smart_str_0()
93 ZSTR_VAL(str->s)[ZSTR_LEN(str->s)] = '\0'; in smart_str_0() local
97 static zend_always_inline size_t smart_str_get_len(smart_str *str) { in smart_str_get_len() argument
98 return str->s ? ZSTR_LEN(str->s) : 0; in smart_str_get_len()
101 static zend_always_inline zend_string *smart_str_extract(smart_str *str) { in smart_str_extract() argument
102 if (str->s) { in smart_str_extract()
104 smart_str_0(str); in smart_str_extract()
105 res = str->s; in smart_str_extract()
106 str->s = NULL; in smart_str_extract()
119 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
121 memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); in smart_str_appendl_ex()