mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress deprecated rb_iterate declaration warnings in C++
This commit is contained in:
parent
a14671a6b6
commit
733ffa74cd
Notes:
git
2021-08-09 11:22:17 +09:00
2 changed files with 10 additions and 2 deletions
|
@ -204,14 +204,14 @@ inline VALUE
|
||||||
rb_iterate(onearg_type *q, VALUE w, type *e, VALUE r)
|
rb_iterate(onearg_type *q, VALUE w, type *e, VALUE r)
|
||||||
{
|
{
|
||||||
rb_block_call_func_t t = reinterpret_cast<rb_block_call_func_t>(e);
|
rb_block_call_func_t t = reinterpret_cast<rb_block_call_func_t>(e);
|
||||||
return ::rb_iterate(q, w, t, r);
|
return backward::rb_iterate(q, w, t, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_NULLPTR
|
#ifdef HAVE_NULLPTR
|
||||||
inline VALUE
|
inline VALUE
|
||||||
rb_iterate(onearg_type *q, VALUE w, std::nullptr_t e, VALUE r)
|
rb_iterate(onearg_type *q, VALUE w, std::nullptr_t e, VALUE r)
|
||||||
{
|
{
|
||||||
return ::rb_iterate(q, w, e, r);
|
return backward::rb_iterate(q, w, e, r);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,14 @@ int rb_keyword_given_p(void);
|
||||||
int rb_block_given_p(void);
|
int rb_block_given_p(void);
|
||||||
void rb_need_block(void);
|
void rb_need_block(void);
|
||||||
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
|
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
namespace ruby {namespace backward {
|
||||||
|
static inline VALUE
|
||||||
|
rb_iterate(VALUE (*iter)(VALUE), VALUE data1, rb_block_call_func_t bl, VALUE data2)
|
||||||
|
{
|
||||||
|
return ::rb_iterate(iter, data1, bl, data2);
|
||||||
|
}}}
|
||||||
|
#endif
|
||||||
DEPRECATED_BY(rb_block_call since 1.9, VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE));
|
DEPRECATED_BY(rb_block_call since 1.9, VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE));
|
||||||
VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
|
VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
|
||||||
VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
|
VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue