summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-06 06:20:13 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-06 06:20:13 -0700
commit0955e45650c166de341ed789885dff318e6c3d63 (patch)
tree74aa4a44701750247e3236cd884836c0e3bf0a80 /share
parent88c878cbc90c36ef0223679c5a7f76d554761bb2 (diff)
downloadtxr-0955e45650c166de341ed789885dff318e6c3d63.tar.gz
txr-0955e45650c166de341ed789885dff318e6c3d63.tar.bz2
txr-0955e45650c166de341ed789885dff318e6c3d63.zip
structs: get rid of sys:slot and sys:static-slot.
* share/txr/stdlib/struct.tl (defstruct, sys:check-slot, defmeth): Use slot rather than sys:slot as indicator in tentative defs. * struct.c (static_slot_s): Variable removed. (struct_init): slot_s initialized with symbol in user package, rather than system package. Initialization of static_slot_s removed. Existing slot function now registered using slot_s. (static_slot_type_reg): Remove reference to static_slot_s. This was a dud all along; nothing publishes deferred warnings against this symbol. * protsym.c (protected_sym): Remove static_slot_s.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/struct.tl8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl
index c02f3d30..91d04f81 100644
--- a/share/txr/stdlib/struct.tl
+++ b/share/txr/stdlib/struct.tl
@@ -136,9 +136,9 @@
(type-sym (gensym)))
(register-tentative-def ^(struct-type . ,name))
(each ((s stat-slots))
- (register-tentative-def ^(sys:slot . ,s)))
+ (register-tentative-def ^(slot . ,s)))
(each ((s inst-slots))
- (register-tentative-def ^(sys:slot . ,s)))
+ (register-tentative-def ^(slot . ,s)))
^(sys:make-struct-type
',name ',super ',stat-slots ',inst-slots
,(if (or func-si-forms val-si-forms)
@@ -192,7 +192,7 @@
(defun sys:check-slot (form slot)
(unless (or (sys:slot-types slot)
(sys:static-slot-types slot))
- (compile-defr-warning form ^(sys:slot . ,slot)
+ (compile-defr-warning form ^(slot . ,slot)
"symbol ~s isn't the name of a struct slot"
slot))
slot)
@@ -298,7 +298,7 @@
((not (find-struct-type type-sym))
(compile-defr-warning form ^(struct-type . ,type-sym)
"definition of struct ~s not seen here" type-sym)))
- (register-tentative-def ^(sys:slot . ,name))
+ (register-tentative-def ^(slot . ,name))
^(sys:define-method ',type-sym ',name (lambda ,arglist
(block ,name ,*body))))