Ruby: changing callback functions prototype for v2.7.
This closes #371 issue on GitHub.
This commit is contained in:
@@ -52,7 +52,8 @@ static int nxt_ruby_hash_info(VALUE r_key, VALUE r_value, VALUE arg);
|
|||||||
static int nxt_ruby_hash_add(VALUE r_key, VALUE r_value, VALUE arg);
|
static int nxt_ruby_hash_add(VALUE r_key, VALUE r_value, VALUE arg);
|
||||||
static int nxt_ruby_rack_result_body(VALUE result);
|
static int nxt_ruby_rack_result_body(VALUE result);
|
||||||
static int nxt_ruby_rack_result_body_file_write(VALUE filepath);
|
static int nxt_ruby_rack_result_body_file_write(VALUE filepath);
|
||||||
static VALUE nxt_ruby_rack_result_body_each(VALUE body);
|
static VALUE nxt_ruby_rack_result_body_each(VALUE body, VALUE arg,
|
||||||
|
int argc, const VALUE *argv, VALUE blockarg);
|
||||||
|
|
||||||
static void nxt_ruby_exception_log(nxt_task_t *task, uint32_t level,
|
static void nxt_ruby_exception_log(nxt_task_t *task, uint32_t level,
|
||||||
const char *desc);
|
const char *desc);
|
||||||
@@ -813,7 +814,8 @@ nxt_ruby_rack_result_body_file_write(VALUE filepath)
|
|||||||
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
nxt_ruby_rack_result_body_each(VALUE body)
|
nxt_ruby_rack_result_body_each(VALUE body, VALUE arg, int argc,
|
||||||
|
const VALUE *argv, VALUE blockarg)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
|||||||
@@ -10,15 +10,15 @@
|
|||||||
|
|
||||||
static VALUE nxt_ruby_stream_io_new(VALUE class, VALUE wrap);
|
static VALUE nxt_ruby_stream_io_new(VALUE class, VALUE wrap);
|
||||||
static VALUE nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self);
|
static VALUE nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self);
|
||||||
static VALUE nxt_ruby_stream_io_gets(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_gets(VALUE obj);
|
||||||
static VALUE nxt_ruby_stream_io_each(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_each(VALUE obj);
|
||||||
static VALUE nxt_ruby_stream_io_read(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_read(VALUE obj, VALUE args);
|
||||||
static VALUE nxt_ruby_stream_io_rewind(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_rewind(VALUE obj);
|
||||||
static VALUE nxt_ruby_stream_io_puts(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_puts(VALUE obj, VALUE args);
|
||||||
static VALUE nxt_ruby_stream_io_write(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_write(VALUE obj, VALUE args);
|
||||||
nxt_inline long nxt_ruby_stream_io_s_write(nxt_ruby_run_ctx_t *run_ctx,
|
nxt_inline long nxt_ruby_stream_io_s_write(nxt_ruby_run_ctx_t *run_ctx,
|
||||||
VALUE val);
|
VALUE val);
|
||||||
static VALUE nxt_ruby_stream_io_flush(VALUE obj, VALUE args);
|
static VALUE nxt_ruby_stream_io_flush(VALUE obj);
|
||||||
|
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
@@ -85,7 +85,7 @@ nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self)
|
|||||||
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
nxt_ruby_stream_io_gets(VALUE obj, VALUE args)
|
nxt_ruby_stream_io_gets(VALUE obj)
|
||||||
{
|
{
|
||||||
VALUE buf;
|
VALUE buf;
|
||||||
char *p;
|
char *p;
|
||||||
@@ -132,7 +132,7 @@ nxt_ruby_stream_io_gets(VALUE obj, VALUE args)
|
|||||||
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
nxt_ruby_stream_io_each(VALUE obj, VALUE args)
|
nxt_ruby_stream_io_each(VALUE obj)
|
||||||
{
|
{
|
||||||
VALUE chunk;
|
VALUE chunk;
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ nxt_ruby_stream_io_each(VALUE obj, VALUE args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ( ;; ) {
|
for ( ;; ) {
|
||||||
chunk = nxt_ruby_stream_io_gets(obj, Qnil);
|
chunk = nxt_ruby_stream_io_gets(obj);
|
||||||
|
|
||||||
if (chunk == Qnil) {
|
if (chunk == Qnil) {
|
||||||
return Qnil;
|
return Qnil;
|
||||||
@@ -203,7 +203,7 @@ nxt_ruby_stream_io_read(VALUE obj, VALUE args)
|
|||||||
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
nxt_ruby_stream_io_rewind(VALUE obj, VALUE args)
|
nxt_ruby_stream_io_rewind(VALUE obj)
|
||||||
{
|
{
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ nxt_ruby_stream_io_s_write(nxt_ruby_run_ctx_t *run_ctx, VALUE val)
|
|||||||
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
nxt_ruby_stream_io_flush(VALUE obj, VALUE args)
|
nxt_ruby_stream_io_flush(VALUE obj)
|
||||||
{
|
{
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user