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
@ -204,14 +204,14 @@ inline VALUE
|
||||
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);
|
||||
return ::rb_iterate(q, w, t, r);
|
||||
return backward::rb_iterate(q, w, t, r);
|
||||
}
|
||||
|
||||
#ifdef HAVE_NULLPTR
|
||||
inline VALUE
|
||||
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
|
||||
|
||||
|
@ -45,6 +45,14 @@ int rb_keyword_given_p(void);
|
||||
int rb_block_given_p(void);
|
||||
void rb_need_block(void);
|
||||
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));
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user