Lines Matching refs:ret

121 …zend_string *ret = (zend_string *)pemalloc(ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persisten…  in zend_string_alloc()  local
123 GC_REFCOUNT(ret) = 1; in zend_string_alloc()
126 GC_TYPE_INFO(ret) = IS_STRING | ((persistent ? IS_STR_PERSISTENT : 0) << 8); in zend_string_alloc()
128 GC_TYPE(ret) = IS_STRING; in zend_string_alloc()
129 GC_FLAGS(ret) = (persistent ? IS_STR_PERSISTENT : 0); in zend_string_alloc()
130 GC_INFO(ret) = 0; in zend_string_alloc()
132 zend_string_forget_hash_val(ret); in zend_string_alloc()
133 ZSTR_LEN(ret) = len; in zend_string_alloc()
134 return ret; in zend_string_alloc()
139 …zend_string *ret = (zend_string *)safe_pemalloc(n, m, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(l)), … in zend_string_safe_alloc() local
141 GC_REFCOUNT(ret) = 1; in zend_string_safe_alloc()
144 GC_TYPE_INFO(ret) = IS_STRING | ((persistent ? IS_STR_PERSISTENT : 0) << 8); in zend_string_safe_alloc()
146 GC_TYPE(ret) = IS_STRING; in zend_string_safe_alloc()
147 GC_FLAGS(ret) = (persistent ? IS_STR_PERSISTENT : 0); in zend_string_safe_alloc()
148 GC_INFO(ret) = 0; in zend_string_safe_alloc()
150 zend_string_forget_hash_val(ret); in zend_string_safe_alloc()
151 ZSTR_LEN(ret) = (n * m) + l; in zend_string_safe_alloc()
152 return ret; in zend_string_safe_alloc()
157 zend_string *ret = zend_string_alloc(len, persistent); in zend_string_init() local
159 memcpy(ZSTR_VAL(ret), str, len); in zend_string_init()
160 ZSTR_VAL(ret)[len] = '\0'; in zend_string_init() local
161 return ret; in zend_string_init()
183 zend_string *ret; in zend_string_realloc() local
187 ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); in zend_string_realloc()
188 ZSTR_LEN(ret) = len; in zend_string_realloc()
189 zend_string_forget_hash_val(ret); in zend_string_realloc()
190 return ret; in zend_string_realloc()
195 ret = zend_string_alloc(len, persistent); in zend_string_realloc()
196 memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), MIN(len, ZSTR_LEN(s)) + 1); in zend_string_realloc()
197 return ret; in zend_string_realloc()
202 zend_string *ret; in zend_string_extend() local
207 ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); in zend_string_extend()
208 ZSTR_LEN(ret) = len; in zend_string_extend()
209 zend_string_forget_hash_val(ret); in zend_string_extend()
210 return ret; in zend_string_extend()
215 ret = zend_string_alloc(len, persistent); in zend_string_extend()
216 memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), ZSTR_LEN(s) + 1); in zend_string_extend()
217 return ret; in zend_string_extend()
222 zend_string *ret; in zend_string_truncate() local
227 ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); in zend_string_truncate()
228 ZSTR_LEN(ret) = len; in zend_string_truncate()
229 zend_string_forget_hash_val(ret); in zend_string_truncate()
230 return ret; in zend_string_truncate()
235 ret = zend_string_alloc(len, persistent); in zend_string_truncate()
236 memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), len + 1); in zend_string_truncate()
237 return ret; in zend_string_truncate()
242 zend_string *ret; in zend_string_safe_realloc() local
246ret = (zend_string *)safe_perealloc(s, n, m, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(l)), persisten… in zend_string_safe_realloc()
247 ZSTR_LEN(ret) = (n * m) + l; in zend_string_safe_realloc()
248 zend_string_forget_hash_val(ret); in zend_string_safe_realloc()
249 return ret; in zend_string_safe_realloc()
254 ret = zend_string_safe_alloc(n, m, l, persistent); in zend_string_safe_realloc()
255 memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), MIN((n * m) + l, ZSTR_LEN(s)) + 1); in zend_string_safe_realloc()
256 return ret; in zend_string_safe_realloc()