From: morioka Date: Fri, 14 May 1999 11:15:24 +0000 (+0000) Subject: (luna-set-slot-value): New function. X-Git-Tag: chao-1_13_0~56 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a7529d24b8cc42f98c1edc4ddf57cff82af8d80;p=elisp%2Fflim.git (luna-set-slot-value): New function. --- diff --git a/luna.el b/luna.el index 6586c3a..7b348de 100644 --- a/luna.el +++ b/luna.el @@ -132,9 +132,13 @@ It must be plist and each slot name must have prefix `:'." `(luna-class-slot-index (luna-find-class (luna-class-name ,entity)) ,slot-name)) -(defsubst luna-slot-value (entity slot-name) - "Return value of SLOT-NAME of ENTITY." - (aref entity (luna-slot-index entity slot-name))) +(defsubst luna-slot-value (entity slot) + "Return the value of SLOT of ENTITY." + (aref entity (luna-slot-index entity slot))) + +(defsubst luna-set-slot-value (entity slot value) + "Store VALUE into SLOT of ENTITY." + (aset entity (luna-slot-index entity slot) value)) (defmacro luna-define-method (name args &rest body) "Define NAME as a method function of (nth 1 (car ARGS)) backend.