ruby-changes:58116
From: Yusuke <ko1@a...>
Date: Fri, 4 Oct 2019 16:09:52 +0900 (JST)
Subject: [ruby-changes:58116] 113bef6976 (master): array.c (rb_mem_clear): remove "register" from arguments
https://git.ruby-lang.org/ruby.git/commit/?id=113bef6976 From 113bef697633803a33a547914b16ba5fbef165b8 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Fri, 4 Oct 2019 16:07:46 +0900 Subject: array.c (rb_mem_clear): remove "register" from arguments to suppress the following warning: ``` compiling cxxanyargs.cpp In file included from cxxanyargs.cpp:1: In file included from ../../.././include/ruby/ruby.h:2150: ../../.././include/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] void rb_mem_clear(register VALUE*, register long); ^~~~~~~~~ ../../.././include/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] void rb_mem_clear(register VALUE*, register long); ^~~~~~~~~ ``` diff --git a/array.c b/array.c index c63bfb3..9235bf2 100644 --- a/array.c +++ b/array.c @@ -240,7 +240,7 @@ rb_ary_ptr_use_end(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L240 } void -rb_mem_clear(register VALUE *mem, register long size) +rb_mem_clear(VALUE *mem, long size) { while (size--) { *mem++ = Qnil; diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 66c2ca6..d6b0a05 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -53,7 +53,7 @@ RUBY_SYMBOL_EXPORT_BEGIN https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L53 #define UNLIMITED_ARGUMENTS (-1) /* array.c */ -void rb_mem_clear(register VALUE*, register long); +void rb_mem_clear(VALUE*, long); VALUE rb_assoc_new(VALUE, VALUE); VALUE rb_check_array_type(VALUE); VALUE rb_ary_new(void); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/