summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-09-06 06:38:28 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-09-06 06:38:28 -0700
commit13732bc2f2f66d992dfaabddd7440b7018d9b562 (patch)
treeb71ffafb0ce9045192dc5acd96720cd4ab753bc3 /struct.c
parent1f47e0a98f45ac2e60e2e23d827fd2f8da6b4962 (diff)
downloadtxr-13732bc2f2f66d992dfaabddd7440b7018d9b562.tar.gz
txr-13732bc2f2f66d992dfaabddd7440b7018d9b562.tar.bz2
txr-13732bc2f2f66d992dfaabddd7440b7018d9b562.zip
struct: remove trivial static function.
* struct.c (get_equal_method): Static function removed. (struct_inst_equalsub): Replace one and only call to get_equal_method with direct call to get_special_static_slot.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/struct.c b/struct.c
index 232b2060..b38487c0 100644
--- a/struct.c
+++ b/struct.c
@@ -1626,16 +1626,11 @@ static val get_special_static_slot(struct struct_type *st,
}
}
-static val get_equal_method(struct struct_type *st)
-{
- return get_special_static_slot(st, equal_meth, equal_s);
-}
-
static val struct_inst_equalsub(val obj)
{
struct struct_inst *si = coerce(struct struct_inst *, obj->co.handle);
struct struct_type *st = si->type;
- val equal_method = get_equal_method(st);
+ val equal_method = get_special_static_slot(st, equal_m, equal_s);
if (equal_method) {
val sub = funcall1(equal_method, obj);
if (nilp(sub)) {