diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-13 06:06:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-13 06:06:28 -0700 |
commit | 0ae617f463290ff4463db2e479604808f940cc76 (patch) | |
tree | 9bbbb38aadef10303583c9986696ab8bdd73855e | |
parent | fb056029e86b0c21d362d623a851a7c89c12ff8b (diff) | |
download | txr-0ae617f463290ff4463db2e479604808f940cc76.tar.gz txr-0ae617f463290ff4463db2e479604808f940cc76.tar.bz2 txr-0ae617f463290ff4463db2e479604808f940cc76.zip |
structs: spurious hiding of usr symbol by sys symbol.
* share/txr/stdlib/struct.tl (sys:defmeth): Rename
function to sys:define-method. Otherwise it hides
usr:defmethod when the current package is sys.
(defmeth): Refer to sys:define-method rather than
sys:defmeth.
-rw-r--r-- | share/txr/stdlib/struct.tl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl index 33c63276..1ad96d06 100644 --- a/share/txr/stdlib/struct.tl +++ b/share/txr/stdlib/struct.tl @@ -285,7 +285,7 @@ (sys:check-slot form slot) ^[(fun umethod) ',slot ,*bound-args]) -(defun sys:defmeth (type-sym name fun) +(defun sys:define-method (type-sym name fun) (caseq name (:init (struct-set-initfun type-sym fun)) (:postinit (struct-set-postinitfun type-sym fun)) @@ -300,8 +300,8 @@ (compile-defr-warning form ^(struct-type . ,type-sym) "definition of struct ~s not seen here" type-sym))) (register-tentative-def ^(sys:slot . ,name)) - ^(sys:defmeth ',type-sym ',name (lambda ,arglist - (block ,name ,*body)))) + ^(sys:define-method ',type-sym ',name (lambda ,arglist + (block ,name ,*body)))) (defmacro with-slots ((. slot-specs) obj-expr . body) (with-gensyms (obj-sym) |