diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-11-08 16:56:28 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-11-08 17:08:01 +0900 |
commit | 2772f85648bc90a445390c8cc82272e53689508f (patch) | |
tree | 1a74a63b5fdb44c9827f263734702fd3ba7cfe7a /ext/-test- | |
parent | b47f7afbc30169ffbaf6ba68db3c1d39e24793b5 (diff) | |
download | ruby-2772f85648bc90a445390c8cc82272e53689508f.tar.gz |
Prefer ANSI-style prototypes over old K&R-style definitions
Diffstat (limited to 'ext/-test-')
-rw-r--r-- | ext/-test-/array/concat/to_ary_concat.c | 8 |
1 files 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 ec1fd321ce..07a96d3907 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) 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) { 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); |