From 6f846ea940cc4bf02dda2f0fbcc44224f1adf172 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sat, 12 Oct 2024 16:00:45 +0200 Subject: [PATCH] minor fixes concerning shape:meta --- shape/shape.lisp | 2 +- storage/tracking.lisp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/shape/shape.lisp b/shape/shape.lisp index 7c37ed1..2edb527 100644 --- a/shape/shape.lisp +++ b/shape/shape.lisp @@ -44,7 +44,7 @@ (print-slots rec stream 'head 'data)) (defmethod head-fields ((rec record)) - (head-fields (get-meta (class-of rec)))) + (head-fields (meta rec))) (defun head-value (rec key) (elt (head rec) (position key (head-fields rec)))) diff --git a/storage/tracking.lisp b/storage/tracking.lisp index 822bf84..e188af7 100644 --- a/storage/tracking.lisp +++ b/storage/tracking.lisp @@ -63,9 +63,10 @@ (make-instance 'container :short-name :trk :storage st)) (defmethod initialize-instance :after ((cont container) &key &allow-other-keys) - (setf (gethash (short-name cont) *containers*) cont) - (setf (item-head-fields cont) - (shape:head-fields (shape:get-meta (item-class cont))))) + (setf (gethash (short-name cont) *containers*) cont)) + +(defun item-head-fields (cont) + (shape:head-fields (shape:get-meta (item-class cont)))) (defun make-item (cont &rest head) (make-instance (item-class cont) :head head :container cont))