diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2023-12-05 17:54:37 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2023-12-05 18:19:42 -0500 |
commit | 0346cbbc148a6eec2f3a5b840758b00b51b3d016 (patch) | |
tree | 754a73daef8024d36951a3469ff33b5fddb44838 /object.c | |
parent | 56eccb350b8872b4eca051cc3e2732cefb717637 (diff) |
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.
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -702,10 +702,8 @@ rb_inspect(VALUE obj) } static int -inspect_i(st_data_t k, st_data_t v, st_data_t a) +inspect_i(ID id, VALUE value, st_data_t a) { - ID id = (ID)k; - VALUE value = (VALUE)v; VALUE str = (VALUE)a; /* need not to show internal data */ |