Lines Matching refs:self

170 	php_stdio_stream_data *self;  in _php_stream_fopen_from_fd_int()  local
172 self = pemalloc_rel_orig(sizeof(*self), persistent_id); in _php_stream_fopen_from_fd_int()
173 memset(self, 0, sizeof(*self)); in _php_stream_fopen_from_fd_int()
174 self->file = NULL; in _php_stream_fopen_from_fd_int()
175 self->is_pipe = 0; in _php_stream_fopen_from_fd_int()
176 self->lock_flag = LOCK_UN; in _php_stream_fopen_from_fd_int()
177 self->is_process_pipe = 0; in _php_stream_fopen_from_fd_int()
178 self->temp_name = NULL; in _php_stream_fopen_from_fd_int()
179 self->fd = fd; in _php_stream_fopen_from_fd_int()
181 self->is_pipe_blocking = 0; in _php_stream_fopen_from_fd_int()
184 return php_stream_alloc_rel(&php_stream_stdio_ops, self, persistent_id, mode); in _php_stream_fopen_from_fd_int()
189 php_stdio_stream_data *self; in _php_stream_fopen_from_file_int() local
191 self = emalloc_rel_orig(sizeof(*self)); in _php_stream_fopen_from_file_int()
192 memset(self, 0, sizeof(*self)); in _php_stream_fopen_from_file_int()
193 self->file = file; in _php_stream_fopen_from_file_int()
194 self->is_pipe = 0; in _php_stream_fopen_from_file_int()
195 self->lock_flag = LOCK_UN; in _php_stream_fopen_from_file_int()
196 self->is_process_pipe = 0; in _php_stream_fopen_from_file_int()
197 self->temp_name = NULL; in _php_stream_fopen_from_file_int()
198 self->fd = fileno(file); in _php_stream_fopen_from_file_int()
200 self->is_pipe_blocking = 0; in _php_stream_fopen_from_file_int()
203 return php_stream_alloc_rel(&php_stream_stdio_ops, self, 0, mode); in _php_stream_fopen_from_file_int()
221 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in _php_stream_fopen_temporary_file() local
225 self->temp_name = opened_path; in _php_stream_fopen_temporary_file()
226 self->lock_flag = LOCK_UN; in _php_stream_fopen_temporary_file()
249 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in _php_stream_fopen_from_fd() local
253 if (self->fd >= 0) { in _php_stream_fopen_from_fd()
254 self->is_pipe = (do_fstat(self, 0) == 0 && S_ISFIFO(self->sb.st_mode)) ? 1 : 0; in _php_stream_fopen_from_fd()
258 zend_uintptr_t handle = _get_osfhandle(self->fd); in _php_stream_fopen_from_fd()
261 self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; in _php_stream_fopen_from_fd()
266 if (self->is_pipe) { in _php_stream_fopen_from_fd()
269 stream->position = zend_lseek(self->fd, 0, SEEK_CUR); in _php_stream_fopen_from_fd()
274 self->is_pipe = 1; in _php_stream_fopen_from_fd()
288 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in _php_stream_fopen_from_file() local
292 if (self->fd >= 0) { in _php_stream_fopen_from_file()
293 self->is_pipe = (do_fstat(self, 0) == 0 && S_ISFIFO(self->sb.st_mode)) ? 1 : 0; in _php_stream_fopen_from_file()
297 zend_uintptr_t handle = _get_osfhandle(self->fd); in _php_stream_fopen_from_file()
300 self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; in _php_stream_fopen_from_file()
305 if (self->is_pipe) { in _php_stream_fopen_from_file()
317 php_stdio_stream_data *self; in _php_stream_fopen_from_pipe() local
320 self = emalloc_rel_orig(sizeof(*self)); in _php_stream_fopen_from_pipe()
321 memset(self, 0, sizeof(*self)); in _php_stream_fopen_from_pipe()
322 self->file = file; in _php_stream_fopen_from_pipe()
323 self->is_pipe = 1; in _php_stream_fopen_from_pipe()
324 self->lock_flag = LOCK_UN; in _php_stream_fopen_from_pipe()
325 self->is_process_pipe = 1; in _php_stream_fopen_from_pipe()
326 self->fd = fileno(file); in _php_stream_fopen_from_pipe()
327 self->temp_name = NULL; in _php_stream_fopen_from_pipe()
329 self->is_pipe_blocking = 0; in _php_stream_fopen_from_pipe()
332 stream = php_stream_alloc_rel(&php_stream_stdio_ops, self, 0, mode); in _php_stream_fopen_from_pipe()
377 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in php_stdiop_read() local
379 if ((self->is_pipe || self->is_process_pipe) && !self->is_pipe_blocking) { in php_stdiop_read()
1033 php_stdio_stream_data *self = (php_stdio_stream_data*)ret->abstract; in _php_stream_fopen() local
1036 r = do_fstat(self, 0); in _php_stream_fopen()
1037 if ((r == 0 && !S_ISREG(self->sb.st_mode))) { in _php_stream_fopen()
1048 php_stdio_stream_data *self = (php_stdio_stream_data*)ret->abstract; in _php_stream_fopen() local
1049 self->is_pipe_blocking = 1; in _php_stream_fopen()