ruby-changes:67933
From: Nobuyoshi <ko1@a...>
Date: Sat, 11 Sep 2021 17:59:10 +0900 (JST)
Subject: [ruby-changes:67933] b568e6a130 (master): Suppress deprecated rb_iterate declaration warnings in C++
https://git.ruby-lang.org/ruby.git/commit/?id=b568e6a130 From b568e6a1304e8b9398ae4f8cc8a09ffa7cf89d8b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 11 Sep 2021 17:54:11 +0900 Subject: Suppress deprecated rb_iterate declaration warnings in C++ Apply commit:733ffa74cd32a5c11ff744a5490782daa00ff1ae again. --- include/ruby/internal/iterator.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/ruby/internal/iterator.h b/include/ruby/internal/iterator.h index 3512b0a..5f70646 100644 --- a/include/ruby/internal/iterator.h +++ b/include/ruby/internal/iterator.h @@ -265,7 +265,9 @@ int rb_block_given_p(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/iterator.h#L265 */ void rb_need_block(void); +#ifndef __cplusplus RBIMPL_ATTR_DEPRECATED(("by: rb_block_call since 1.9")) +#endif /** * Old way to iterate a block. * @@ -300,6 +302,9 @@ rb_iterate_deprecated(VALUE (*iter)(VALUE), VALUE data1, rb_block_call_func_t bl https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/iterator.h#L302 { return ::rb_iterate(iter, data1, bl, data2); }}} + +RBIMPL_ATTR_DEPRECATED(("by: rb_block_call since 1.9")) +VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2); #endif /** -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/