From 900597a05d48be775bfb0e504e3179062806ff02 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 31 Dec 2017 00:07:27 -0800 Subject: 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. --- struct.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'struct.c') 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); -- cgit v1.2.3