Lines Matching refs:buf
94 VALUE buf; in nxt_ruby_stream_io_gets() local
111 buf = rb_str_buf_new(res); in nxt_ruby_stream_io_gets()
113 if (nxt_slow_path(buf == Qnil)) { in nxt_ruby_stream_io_gets()
117 res = nxt_unit_request_read(req, RSTRING_PTR(buf), res); in nxt_ruby_stream_io_gets()
119 rb_str_set_len(buf, res); in nxt_ruby_stream_io_gets()
121 return buf; in nxt_ruby_stream_io_gets()
151 VALUE buf; in nxt_ruby_stream_io_read() local
175 buf = rb_str_buf_new(copy_size); in nxt_ruby_stream_io_read()
177 if (nxt_slow_path(buf == Qnil)) { in nxt_ruby_stream_io_read()
181 copy_size = nxt_unit_request_read(rctx->req, RSTRING_PTR(buf), copy_size); in nxt_ruby_stream_io_read()
186 rb_str_cat(RARRAY_PTR(args)[1], RSTRING_PTR(buf), copy_size); in nxt_ruby_stream_io_read()
189 rb_str_set_len(buf, copy_size); in nxt_ruby_stream_io_read()
191 return buf; in nxt_ruby_stream_io_read()