summaryrefslogtreecommitdiffstats
path: root/struct.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-16 21:47:12 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-16 21:47:12 -0700
commit5fb5509d8d5a4bb0646b1beb083be6b6a6ec55d1 (patch)
tree2fdcd060e1efbf25fdf672da54056e73f02606b9 /struct.h
parentadeabf115e33a3a2efdf04c6a33fdebccb876ce9 (diff)
downloadtxr-5fb5509d8d5a4bb0646b1beb083be6b6a6ec55d1.tar.gz
txr-5fb5509d8d5a4bb0646b1beb083be6b6a6ec55d1.tar.bz2
txr-5fb5509d8d5a4bb0646b1beb083be6b6a6ec55d1.zip
Adding defmeth macro and static-slot-ensure.
* share/txr/stdlib/struct.tl (defmeth): New macro. * struct.c (struct struct_type): New member, dvtypes. (struct_init): Register static-slot-ensure intrinsic. (make_struct_type): Initialize dvtypes of newly instantiated struct_type struct. If a super is specified, add new type to the super's dvtypes. (struct_type_mark): Mark st->dvtypes. (static_slot_ensure): New function. * struct.h (static_slot_ensure): Declared. * txr.1: Documented defmeth and static-slot-ensure.
Diffstat (limited to 'struct.h')
-rw-r--r--struct.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/struct.h b/struct.h
index 52a62fa8..88f5a1c6 100644
--- a/struct.h
+++ b/struct.h
@@ -40,6 +40,7 @@ val slot(val strct, val sym);
val slotset(val strct, val sym, val newval);
val static_slot(val stype, val sym);
val static_slot_set(val stype, val sym, val newval);
+val static_slot_ensure(val stype, val sym, val newval, val no_error_p);
val slotp(val type, val sym);
val static_slot_p(val type, val sym);
val structp(val obj);