ruby-changes:69641
From: Nobuyoshi <ko1@a...>
Date: Mon, 8 Nov 2021 17:17:54 +0900 (JST)
Subject: [ruby-changes:69641] 2772f85648 (master): Prefer ANSI-style prototypes over old K&R-style definitions
https://git.ruby-lang.org/ruby.git/commit/?id=2772f85648 From 2772f85648bc90a445390c8cc82272e53689508f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 8 Nov 2021 16:56:28 +0900 Subject: Prefer ANSI-style prototypes over old K&R-style definitions --- ext/-test-/array/concat/to_ary_concat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/-test-/array/concat/to_ary_concat.c b/ext/-test-/array/concat/to_ary_concat.c index ec1fd321ce9..07a96d39072 100644 --- a/ext/-test-/array/concat/to_ary_concat.c +++ b/ext/-test-/array/concat/to_ary_concat.c @@ -17,7 +17,9 @@ Bar_alloc(VALUE klass) https://github.com/ruby/ruby/blob/trunk/ext/-test-/array/concat/to_ary_concat.c#L17 return TypedData_Wrap_Struct(klass, &Bar_type, NULL); } -VALUE Bar_to_ary(VALUE _self) { +static VALUE +Bar_to_ary(VALUE _self) +{ VALUE ary = rb_ary_new2(2); VALUE foo = rb_ary_new2(0); rb_ary_push(ary, foo); @@ -26,7 +28,9 @@ VALUE Bar_to_ary(VALUE _self) { https://github.com/ruby/ruby/blob/trunk/ext/-test-/array/concat/to_ary_concat.c#L28 return ary; } -void Init_to_ary_concat() { +void +Init_to_ary_concat(void) +{ VALUE mBug = rb_define_module("Bug"); VALUE bar = rb_define_class_under(mBug, "Bar", rb_cObject); rb_define_alloc_func(bar, Bar_alloc); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/