mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Get rid of type-punning cast
This commit is contained in:
parent
1d9e129255
commit
ec021e469d
1 changed files with 3 additions and 1 deletions
|
@ -1084,14 +1084,16 @@ static bool
|
||||||
iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl_entry **ent)
|
iv_index_tbl_lookup(struct st_table *iv_index_tbl, ID id, struct rb_iv_index_tbl_entry **ent)
|
||||||
{
|
{
|
||||||
int found;
|
int found;
|
||||||
|
st_data_t ent_data;
|
||||||
|
|
||||||
if (iv_index_tbl == NULL) return false;
|
if (iv_index_tbl == NULL) return false;
|
||||||
|
|
||||||
RB_VM_LOCK_ENTER();
|
RB_VM_LOCK_ENTER();
|
||||||
{
|
{
|
||||||
found = st_lookup(iv_index_tbl, (st_data_t)id, (st_data_t *)ent);
|
found = st_lookup(iv_index_tbl, (st_data_t)id, &ent_data);
|
||||||
}
|
}
|
||||||
RB_VM_LOCK_LEAVE();
|
RB_VM_LOCK_LEAVE();
|
||||||
|
if (found) *ent = (struct rb_iv_index_tbl_entry *)ent_data;
|
||||||
|
|
||||||
return found ? true : false;
|
return found ? true : false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue