From 716fdbd5de3a96e0853120f933907150aecb691f Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Sun, 13 Jan 2008 02:25:15 +0100 Subject: [PATCH] add-slot replaced internally by appropriate add-object method. --- lsobjects.lsp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lsobjects.lsp b/lsobjects.lsp index 0f7e827..9f65756 100644 --- a/lsobjects.lsp +++ b/lsobjects.lsp @@ -94,7 +94,10 @@ ;; (defclass preclist (proto-object-list)) ;; (defclass parents (proto-object-list)) -(defgeneric add-object (obj proto-struct &key location)) +(defgeneric add-object (proto-struct slot value &key location) + "proto-struct is the prototype structure that we are working with, +while slot means either slot or method, and value is the data or the +method that we want to add with the name given in slot.") (defgeneric delete-object (obj proto-struct)) (defgeneric objects (proto-struct)) (defgeneric get-object (objSym proto-struct)) @@ -386,7 +389,15 @@ Returns a new object with parents PARENTS. If PARENTS is NIL, (let ((slot-entry (find-own-slot object slot))) (if slot-entry (return slot-entry))))))) +;; To remove. (defun add-slot (x slot value) + "Remove when completely replaced by add-object methods." + (add-object x slot value)) + +(defmethod add-object ((x proto-object) + (slot symbol) + (value ) + &key (location )) (check-object x) (non-nil-symbol-p slot) (let ((slot-entry (find-own-slot x slot))) -- 2.11.4.GIT