environ: use cell registry: register-cell, find-cells
This commit is contained in:
parent
e3308dbf80
commit
baf46a36d4
1 changed files with 13 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
|||
(:use :common-lisp)
|
||||
(:local-nicknames (:actor :scopes/core/actor)
|
||||
(:csys :scopes/csys)
|
||||
(:index :scopes/util/index)
|
||||
(:message :scopes/core/message)
|
||||
(:shape :scopes/shape))
|
||||
(:export #:actions
|
||||
|
|
@ -35,7 +36,17 @@
|
|||
|
||||
;;;; helpers
|
||||
|
||||
(defun register-cell (reg addr cell))
|
||||
(defun register-cell (reg addr cell)
|
||||
(destructuring-bind (cat key) addr
|
||||
(let ((idx (getf cat reg)))
|
||||
(unless idx
|
||||
(setf idx (index:create))
|
||||
(setf (getf cat reg) idx))
|
||||
(index:put idx key cell))))
|
||||
|
||||
(defun find-cells (reg addr))
|
||||
(defun find-cells (reg addr)
|
||||
(destructuring-bind (cat key) addr
|
||||
(let ((idx (getf cat reg)))
|
||||
(when idx
|
||||
(index:query idx key)))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue