Skip to content

Commit

Permalink
Fixed if allocated dict with mp, alloc boxes from mp
Browse files Browse the repository at this point in the history
  • Loading branch information
VOS Maintainer committed Aug 24, 2015
1 parent ba79ecd commit 342a683
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libsrc/Wi/rdfld.c
Expand Up @@ -176,7 +176,11 @@ cu_rl_local_exec (cucurbit_t * cu)
id_hash_t *ht;
if (dict_place && (ht = dict_ht (*dict_place)))
{
caddr_t one = (caddr_t) 1, id_box = box_num (id);
caddr_t one = (caddr_t) 1, id_box;
if (ht->ht_mp)
id_box = mp_box_num ((mem_pool_t *) (ht->ht_mp), id);
else
id_box = box_num (id);
id_hash_set (ht, (caddr_t) & id_box, (caddr_t) & one);
}
}
Expand All @@ -197,7 +201,11 @@ cu_rl_local_exec (cucurbit_t * cu)
id_hash_t *ht;
if (dict_place && (ht = dict_ht (*dict_place)))
{
caddr_t one = (caddr_t) 1, id_box = box_num (id);
caddr_t one = (caddr_t) 1, id_box;
if (ht->ht_mp)
id_box = mp_box_num ((mem_pool_t *) (ht->ht_mp), id);
else
id_box = box_num (id);
id_hash_set (ht, (caddr_t) & id_box, (caddr_t) & one);
}
}
Expand Down

0 comments on commit 342a683

Please sign in to comment.