summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-15 20:08:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-15 20:08:31 -0700
commite87568a3d43593d53c1d294e4f42f46232877855 (patch)
tree0728be13f7f044972d319abe8240c2f32e95ff9c /ffi.c
parent87e185aa2d2cfe18df7e89ddfd05b2dd262fe791 (diff)
downloadtxr-e87568a3d43593d53c1d294e4f42f46232877855.tar.gz
txr-e87568a3d43593d53c1d294e4f42f46232877855.tar.bz2
txr-e87568a3d43593d53c1d294e4f42f46232877855.zip
cobj: rename poorly named default operation.
Renaming cobj_hash_op to cobj_eq_hash_op. This function is only appropriate to use with COBJ objects which use eq as their equal funtion. I've spotted one instance of an inappropriate use which have to be addressed by a different commit: the equal function is other than eq, but cobj_hash_op is used for the equal hash. * lib.h (cobj_hash_op): Declaration renamed to cobj_eq_hash_op. * hash.c (cobj_hash_op): Renamed to cobj_eq_hash_op. (hash_iter_ops): Refer to renamed cobj_hash_eq_op. * ffi.c (ffi_type_builtin_ops, ffi_type_struct_ops, ffi_type_ptr_ops, ffi-closure_ops, ffi_call_desc_ops): Likewise. * lib.c (cptr_ops): Likewise. * parser.c (parser_ops): Likewise. * rand.c (random_state_ops): Likewise. * regex.c (char_set_ops, regex_obj_ops): Likewise. * socket.c (dgram_strm_ops): Likewise. * stream.c (null_ops, stdio_ops, tail_ops, pipe_ops, dir_ops, string_in_ops, byte_in_ops, strlist_in_ops, string_out_ops, strlist_out_ops, cat_stream_ops, record_adapter_ops): Likewise. * struct.c (struct_type_ops): Likewise. * sysif.c (cptr_dl_ops): Likewise. * syslog.c (syslog_strm_ops): Likewise. * unwind.c (cont_ops): Likewise.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ffi.c b/ffi.c
index 71f095df..e72b3d1f 100644
--- a/ffi.c
+++ b/ffi.c
@@ -165,21 +165,21 @@ static struct cobj_ops ffi_type_builtin_ops =
ffi_type_print_op,
cobj_destroy_free_op,
cobj_mark_op,
- cobj_hash_op);
+ cobj_eq_hash_op);
static struct cobj_ops ffi_type_struct_ops =
cobj_ops_init(eq,
ffi_type_print_op,
ffi_type_struct_destroy_op,
ffi_struct_type_mark,
- cobj_hash_op);
+ cobj_eq_hash_op);
static struct cobj_ops ffi_type_ptr_ops =
cobj_ops_init(eq,
ffi_type_print_op,
cobj_destroy_free_op,
ffi_ptr_type_mark,
- cobj_hash_op);
+ cobj_eq_hash_op);
struct txr_ffi_closure {
ffi_closure *clo;
@@ -234,7 +234,7 @@ static struct cobj_ops ffi_closure_ops =
ffi_closure_print_op,
ffi_closure_destroy_op,
ffi_closure_mark_op,
- cobj_hash_op);
+ cobj_eq_hash_op);
static void ffi_void_put(struct txr_ffi_type *tft, val n, mem_t *dst, val self)
{
@@ -1881,7 +1881,7 @@ static struct cobj_ops ffi_call_desc_ops =
ffi_call_desc_print_op,
ffi_call_desc_destroy_op,
ffi_call_desc_mark_op,
- cobj_hash_op);
+ cobj_eq_hash_op);
val ffi_make_call_desc(val ntotal, val nfixed, val rettype, val argtypes)
{