summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-03-26 16:37:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-03-26 16:37:54 -0700
commitab59762e97c7f68f271fde7401d93c26bbbe7d6d (patch)
treeccde357039e09ec823b545aab369ae94308471f0 /struct.c
parentd152f874b7096d6642a00b8237a94b6fd9991c00 (diff)
downloadtxr-ab59762e97c7f68f271fde7401d93c26bbbe7d6d.tar.gz
txr-ab59762e97c7f68f271fde7401d93c26bbbe7d6d.tar.bz2
txr-ab59762e97c7f68f271fde7401d93c26bbbe7d6d.zip
New function: arithp.
* lib.h (arithp): Declared. (plus_s): Existing symbol declared. * arith.c (arithp): New function. * struct.h (special_slot): New enum member plus_m. * struct.c (special_sym): Register plus_s together as the [plus_m] entry of the array. * tests/016/arith.tl * tests/016/ud-arith.tl: Tests for arithp. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 04b429cc..da9b8051 100644
--- a/struct.c
+++ b/struct.c
@@ -114,7 +114,8 @@ val iter_begin_s, iter_more_s, iter_item_s, iter_step_s, iter_reset_s;
static val *special_sym[num_special_slots] = {
&equal_s, &nullify_s, &from_list_s, &lambda_s, &lambda_set_s,
&length_s, &car_s, &cdr_s, &rplaca_s, &rplacd_s,
- &iter_begin_s, &iter_more_s, &iter_item_s, &iter_step_s, &iter_reset_s
+ &iter_begin_s, &iter_more_s, &iter_item_s, &iter_step_s, &iter_reset_s,
+ &plus_s
};
static struct cobj_class *struct_type_cls;