diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-03 19:20:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-03 19:20:52 -0700 |
commit | a40d5455f2deb554ef3007b37441c16506f1c557 (patch) | |
tree | b3b58b03dafb887b8fea4ab8fc2dac4093ffe199 /struct.c | |
parent | 9ac9586db2f2218ff7cd45a5b812b0835ad2dab2 (diff) | |
download | txr-a40d5455f2deb554ef3007b37441c16506f1c557.tar.gz txr-a40d5455f2deb554ef3007b37441c16506f1c557.tar.bz2 txr-a40d5455f2deb554ef3007b37441c16506f1c557.zip |
slot-p renamed to slotp, conforming with Lisp conventions.
* share/txr/stdlib/struct.tl (sys:prune-nil-inits):
Use of slot-p renamed.
* struct.c (struct_init): Register slotp, and make
registration of slot-p conditional on compatibility option.
(slot_p): Function renamed to slotp.
* struct.h (slot_p): Declaration renamed.
* txr.1: References to slot-p fixed to slotp. Compat notes
added.
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -120,7 +120,9 @@ void struct_init(void) func_n2v(call_super_method)); reg_fun(intern(lit("call-super-fun"), user_package), func_n2v(call_super_fun)); - reg_fun(intern(lit("slot-p"), user_package), func_n2(slot_p)); + reg_fun(intern(lit("slotp"), user_package), func_n2(slotp)); + if (opt_compat && opt_compat <= 118) + reg_fun(intern(lit("slot-p"), user_package), func_n2(slotp)); reg_fun(intern(lit("static-slot-p"), user_package), func_n2(static_slot_p)); reg_fun(intern(lit("structp"), user_package), func_n1(structp)); reg_fun(intern(lit("struct-type"), user_package), func_n1(struct_type)); @@ -623,13 +625,13 @@ static val call_super_fun(val type, val sym, struct args *args) type, nao); } -val slot_p(val type, val sym) +val slotp(val type, val sym) { if (type && symbolp(type)) { val stype = find_struct_type(type); if (!stype) no_such_struct(lit("slot-p"), type); - return slot_p(stype, sym); + return slotp(stype, sym); } else { struct struct_type *st = coerce(struct struct_type *, cobj_handle(type, struct_type_s)); |