mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix parameter types for rb_ivar_foreach() callbacks
For this public API, the callback is declared to take `(ID, VALUE, st_data_t)`, but it so happens that using `(st_data_t, st_data_t, st_data_t)` also type checks, because the underlying type is identical. Use it as declared and get rid of some casts.
This commit is contained in:
parent
56eccb350b
commit
0346cbbc14
4 changed files with 11 additions and 19 deletions
4
error.c
4
error.c
|
@ -3248,9 +3248,9 @@ exception_dumper(VALUE exc)
|
|||
}
|
||||
|
||||
static int
|
||||
ivar_copy_i(st_data_t key, st_data_t val, st_data_t exc)
|
||||
ivar_copy_i(ID key, VALUE val, st_data_t exc)
|
||||
{
|
||||
rb_ivar_set((VALUE) exc, (ID) key, (VALUE) val);
|
||||
rb_ivar_set((VALUE)exc, key, val);
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue