Lines Matching refs:val
229 static int ps_files_write(ps_files *data, zend_string *key, zend_string *val) in ps_files_write() argument
242 if (ZSTR_LEN(val) < data->st_size) { in ps_files_write()
247 n = pwrite(data->fd, ZSTR_VAL(val), ZSTR_LEN(val), 0); in ps_files_write()
252 unsigned int to_write = ZSTR_LEN(val) > UINT_MAX ? UINT_MAX : (unsigned int)ZSTR_LEN(val); in ps_files_write()
253 char *buf = ZSTR_VAL(val); in ps_files_write()
261 …to_write = wrote > -1 ? (ZSTR_LEN(val) - n > UINT_MAX ? UINT_MAX : (unsigned int)(ZSTR_LEN(val) - … in ps_files_write()
266 n = write(data->fd, ZSTR_VAL(val), ZSTR_LEN(val)); in ps_files_write()
270 if (n != ZSTR_LEN(val)) { in ps_files_write()
491 *val = ZSTR_EMPTY_ALLOC(); in PS_READ_FUNC()
495 *val = zend_string_alloc(sbuf.st_size, 0); in PS_READ_FUNC()
498 n = pread(data->fd, ZSTR_VAL(*val), ZSTR_LEN(*val), 0); in PS_READ_FUNC()
503 unsigned int to_read = ZSTR_LEN(*val) > UINT_MAX ? UINT_MAX : (unsigned int)ZSTR_LEN(*val); in PS_READ_FUNC()
504 char *buf = ZSTR_VAL(*val); in PS_READ_FUNC()
512 …to_read = read_in > -1 ? (ZSTR_LEN(*val) - n > UINT_MAX ? UINT_MAX : (unsigned int)(ZSTR_LEN(*val)… in PS_READ_FUNC()
518 n = read(data->fd, ZSTR_VAL(*val), ZSTR_LEN(*val)); in PS_READ_FUNC()
528 zend_string_release_ex(*val, 0); in PS_READ_FUNC()
529 *val = ZSTR_EMPTY_ALLOC(); in PS_READ_FUNC()
533 ZSTR_VAL(*val)[ZSTR_LEN(*val)] = '\0'; in PS_READ_FUNC() local
550 return ps_files_write(data, key, val); in PS_WRITE_FUNC()
582 return ps_files_write(data, key, val); in PS_UPDATE_TIMESTAMP_FUNC()