summaryrefslogtreecommitdiffstats
path: root/sysif.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-15 20:28:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-15 20:28:25 -0700
commitf43feacabc378cbbf31beea28f41f1cb9483f4b6 (patch)
treed6317f816808cad72df2e856583c85c342ee787b /sysif.c
parente87568a3d43593d53c1d294e4f42f46232877855 (diff)
downloadtxr-f43feacabc378cbbf31beea28f41f1cb9483f4b6.tar.gz
txr-f43feacabc378cbbf31beea28f41f1cb9483f4b6.tar.bz2
txr-f43feacabc378cbbf31beea28f41f1cb9483f4b6.zip
bugfix: use proper hashing for cptr.
Since cptr objects are equal if their handles are equal, they must have a hashing function over the handle rather than over their own address. * lib.c (cobj_handle_hash_op): New function. (cptr_ops): Use cobj_handle_hash_op instead of cobj_eq_hash_op. * lib.h (cobj_handle_hash_op): Declared. * sysif.c (cptr_dl_ops): Use cobj_handle_hash_op instead of cobj_eq_hash_op.
Diffstat (limited to 'sysif.c')
-rw-r--r--sysif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysif.c b/sysif.c
index e4d6de88..78dcda6c 100644
--- a/sysif.c
+++ b/sysif.c
@@ -1470,7 +1470,7 @@ static struct cobj_ops cptr_dl_ops = {
cobj_print_op,
cptr_dl_destroy_op,
cobj_mark_op,
- cobj_eq_hash_op
+ cobj_handle_hash_op
};
static val dlopen_wrap(val name, val flags)