Lines Matching refs:self
172 php_stdio_stream_data *self; in _php_stream_fopen_from_fd_int() local
174 self = pemalloc_rel_orig(sizeof(*self), persistent_id); in _php_stream_fopen_from_fd_int()
175 memset(self, 0, sizeof(*self)); in _php_stream_fopen_from_fd_int()
176 self->file = NULL; in _php_stream_fopen_from_fd_int()
177 self->is_pipe = 0; in _php_stream_fopen_from_fd_int()
178 self->lock_flag = LOCK_UN; in _php_stream_fopen_from_fd_int()
179 self->is_process_pipe = 0; in _php_stream_fopen_from_fd_int()
180 self->temp_name = NULL; in _php_stream_fopen_from_fd_int()
181 self->fd = fd; in _php_stream_fopen_from_fd_int()
183 self->is_pipe_blocking = 0; in _php_stream_fopen_from_fd_int()
186 return php_stream_alloc_rel(&php_stream_stdio_ops, self, persistent_id, mode); in _php_stream_fopen_from_fd_int()
191 php_stdio_stream_data *self; in _php_stream_fopen_from_file_int() local
193 self = emalloc_rel_orig(sizeof(*self)); in _php_stream_fopen_from_file_int()
194 memset(self, 0, sizeof(*self)); in _php_stream_fopen_from_file_int()
195 self->file = file; in _php_stream_fopen_from_file_int()
196 self->is_pipe = 0; in _php_stream_fopen_from_file_int()
197 self->lock_flag = LOCK_UN; in _php_stream_fopen_from_file_int()
198 self->is_process_pipe = 0; in _php_stream_fopen_from_file_int()
199 self->temp_name = NULL; in _php_stream_fopen_from_file_int()
200 self->fd = fileno(file); in _php_stream_fopen_from_file_int()
202 self->is_pipe_blocking = 0; in _php_stream_fopen_from_file_int()
205 return php_stream_alloc_rel(&php_stream_stdio_ops, self, 0, mode); in _php_stream_fopen_from_file_int()
223 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in _php_stream_fopen_temporary_file() local
227 self->temp_name = opened_path; in _php_stream_fopen_temporary_file()
228 self->lock_flag = LOCK_UN; in _php_stream_fopen_temporary_file()
251 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in _php_stream_fopen_from_fd() local
255 if (self->fd >= 0) { in _php_stream_fopen_from_fd()
256 self->is_pipe = (do_fstat(self, 0) == 0 && S_ISFIFO(self->sb.st_mode)) ? 1 : 0; in _php_stream_fopen_from_fd()
260 zend_uintptr_t handle = _get_osfhandle(self->fd); in _php_stream_fopen_from_fd()
263 self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; in _php_stream_fopen_from_fd()
268 if (self->is_pipe) { in _php_stream_fopen_from_fd()
271 stream->position = zend_lseek(self->fd, 0, SEEK_CUR); in _php_stream_fopen_from_fd()
276 self->is_pipe = 1; in _php_stream_fopen_from_fd()
290 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in _php_stream_fopen_from_file() local
294 if (self->fd >= 0) { in _php_stream_fopen_from_file()
295 self->is_pipe = (do_fstat(self, 0) == 0 && S_ISFIFO(self->sb.st_mode)) ? 1 : 0; in _php_stream_fopen_from_file()
299 zend_uintptr_t handle = _get_osfhandle(self->fd); in _php_stream_fopen_from_file()
302 self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; in _php_stream_fopen_from_file()
307 if (self->is_pipe) { in _php_stream_fopen_from_file()
319 php_stdio_stream_data *self; in _php_stream_fopen_from_pipe() local
322 self = emalloc_rel_orig(sizeof(*self)); in _php_stream_fopen_from_pipe()
323 memset(self, 0, sizeof(*self)); in _php_stream_fopen_from_pipe()
324 self->file = file; in _php_stream_fopen_from_pipe()
325 self->is_pipe = 1; in _php_stream_fopen_from_pipe()
326 self->lock_flag = LOCK_UN; in _php_stream_fopen_from_pipe()
327 self->is_process_pipe = 1; in _php_stream_fopen_from_pipe()
328 self->fd = fileno(file); in _php_stream_fopen_from_pipe()
329 self->temp_name = NULL; in _php_stream_fopen_from_pipe()
331 self->is_pipe_blocking = 0; in _php_stream_fopen_from_pipe()
334 stream = php_stream_alloc_rel(&php_stream_stdio_ops, self, 0, mode); in _php_stream_fopen_from_pipe()
379 php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract; in php_stdiop_read() local
381 if ((self->is_pipe || self->is_process_pipe) && !self->is_pipe_blocking) { in php_stdiop_read()
1038 php_stdio_stream_data *self = (php_stdio_stream_data*)ret->abstract; in _php_stream_fopen() local
1041 r = do_fstat(self, 0); in _php_stream_fopen()
1042 if ((r == 0 && !S_ISREG(self->sb.st_mode))) { in _php_stream_fopen()
1053 php_stdio_stream_data *self = (php_stdio_stream_data*)ret->abstract; in _php_stream_fopen() local
1054 self->is_pipe_blocking = 1; in _php_stream_fopen()