summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/hash.c b/hash.c
index 8a4c554b..2a4beda8 100644
--- a/hash.c
+++ b/hash.c
@@ -426,13 +426,11 @@ static void hash_mark(val hash)
}
}
-static struct cobj_ops hash_ops = {
- hash_equal_op,
- hash_print_op,
- cobj_destroy_free_op,
- hash_mark,
- hash_hash_op,
-};
+static struct cobj_ops hash_ops = cobj_ops_init(hash_equal_op,
+ hash_print_op,
+ cobj_destroy_free_op,
+ hash_mark,
+ hash_hash_op);
static void hash_grow(struct hash *h, val hash)
{
@@ -655,13 +653,11 @@ static void hash_iter_mark(val hash_iter)
reachable_iters = hi;
}
-static struct cobj_ops hash_iter_ops = {
- eq,
- cobj_print_op,
- cobj_destroy_free_op,
- hash_iter_mark,
- cobj_hash_op
-};
+static struct cobj_ops hash_iter_ops = cobj_ops_init(eq,
+ cobj_print_op,
+ cobj_destroy_free_op,
+ hash_iter_mark,
+ cobj_hash_op);
val hash_begin(val hash)
{