summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-12-31 00:07:27 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-12-31 00:07:27 -0800
commit900597a05d48be775bfb0e504e3179062806ff02 (patch)
tree416102dbbc8ad28703c977524ebd9a04ea01aa2d /struct.c
parent422eda12b8a931039a5bf613a8c260c3d6853403 (diff)
downloadtxr-900597a05d48be775bfb0e504e3179062806ff02.tar.gz
txr-900597a05d48be775bfb0e504e3179062806ff02.tar.bz2
txr-900597a05d48be775bfb0e504e3179062806ff02.zip
New inlined test for struct object.
* lib.c (seq_info, car, cdr, make_like, nullify, generic_funcall, copy, length, empty, ref, refset, dwim_set, dwim_del, populate_obj_hash): Use new obj_struct_p test when we know that the object is a COBJ. * struct.c (struct_inst_ops): Change from static to extern. * struct.h (ob_struct_p): New inline function.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/struct.c b/struct.c
index 4c5dd2d0..28d823d2 100644
--- a/struct.c
+++ b/struct.c
@@ -102,7 +102,6 @@ static val static_slot_type_hash;
static val struct_type_finalize(val obj);
static_forward(struct cobj_ops struct_type_ops);
-static_forward(struct cobj_ops struct_inst_ops);
static val make_struct_type_compat(val name, val super, val slots,
val initfun, val boactor);
@@ -1636,7 +1635,7 @@ static_def(struct cobj_ops struct_type_ops =
cobj_ops_init(eq, struct_type_print, struct_type_destroy,
struct_type_mark, cobj_eq_hash_op))
-static_def(struct cobj_ops struct_inst_ops =
- cobj_ops_init_ex(struct_inst_equal, struct_inst_print,
- cobj_destroy_free_op, struct_inst_mark,
- struct_inst_hash, struct_inst_equalsub))
+struct cobj_ops struct_inst_ops =
+ cobj_ops_init_ex(struct_inst_equal, struct_inst_print,
+ cobj_destroy_free_op, struct_inst_mark,
+ struct_inst_hash, struct_inst_equalsub);