ruby-changes:49208
From: naruse <ko1@a...>
Date: Mon, 18 Dec 2017 18:04:04 +0900 (JST)
Subject: [ruby-changes:49208] naruse:r61323 (trunk): suppress warning: 'const' attribute on function returning 'void'
naruse 2017-12-18 18:03:59 +0900 (Mon, 18 Dec 2017) New Revision: 61323 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61323 Log: suppress warning: 'const' attribute on function returning 'void' Modified files: trunk/include/ruby/intern.h trunk/include/ruby/ruby.h trunk/internal.h Index: internal.h =================================================================== --- internal.h (revision 61322) +++ internal.h (revision 61323) @@ -1110,7 +1110,7 @@ VALUE rb_invcmp(VALUE, VALUE); https://github.com/ruby/ruby/blob/trunk/internal.h#L1110 struct rb_block; int rb_dvar_defined(ID, const struct rb_block *); int rb_local_defined(ID, const struct rb_block *); -CONSTFUNC(const char * rb_insns_name(int i)); +const char * rb_insns_name(int i); VALUE rb_insns_name_array(void); /* complex.c */ @@ -1136,7 +1136,7 @@ void Init_ext(void); https://github.com/ruby/ruby/blob/trunk/internal.h#L1136 /* encoding.c */ ID rb_id_encoding(void); -CONSTFUNC(void rb_gc_mark_encodings(void)); +void rb_gc_mark_encodings(void); rb_encoding *rb_enc_get_from_index(int index); rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2); int rb_encdb_replicate(const char *alias, const char *orig); Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 61322) +++ include/ruby/intern.h (revision 61323) @@ -249,9 +249,9 @@ PRINTF_ARGS(NORETURN(void rb_name_error_ https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L249 NORETURN(void rb_invalid_str(const char*, const char*)); NORETURN(void rb_error_frozen(const char*)); NORETURN(void rb_error_frozen_object(VALUE)); -CONSTFUNC(void rb_error_untrusted(VALUE)); +void rb_error_untrusted(VALUE); void rb_check_frozen(VALUE); -CONSTFUNC(void rb_check_trusted(VALUE)); +void rb_check_trusted(VALUE); #define rb_check_frozen_internal(obj) do { \ VALUE frozen_obj = (obj); \ if (OBJ_FROZEN(frozen_obj)) { \ Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 61322) +++ include/ruby/ruby.h (revision 61323) @@ -628,7 +628,7 @@ int ruby_safe_level_2_warning(void) __at https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L628 # define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error)) #endif void rb_set_safe_level_force(int); -CONSTFUNC(void rb_secure_update(VALUE)); +void rb_secure_update(VALUE); NORETURN(void rb_insecure_operation(void)); VALUE rb_errinfo(void); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/