aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-02-10 07:07:20 -0600
committerColin Okay <okay@toyful.space>2022-02-10 07:07:20 -0600
commitce892522669e953250e350d493417c86bde5ec35 (patch)
tree60c5771940124019fe80726b41ddc2ae7b437182
parentaec0893df2f4bb8fa8da7c71cb8dca09c0bd5f86 (diff)
changed app state to compare keys with equal
-rw-r--r--lazybones.lisp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lazybones.lisp b/lazybones.lisp
index 5ccbf6f..2a62d91 100644
--- a/lazybones.lisp
+++ b/lazybones.lisp
@@ -62,8 +62,8 @@
value of NIL means that there is no default authorizer.")
(state-table
:accessor app-state-table
- :initform (make-hash-table)
- :documentation "A hash table with EQL comparing keys. Used for storing arbitrary application state.")
+ :initform (make-hash-table :test 'equal)
+ :documentation "A hash table with EQUAL comparing keys. Used for storing arbitrary application state.")
(default-content-type
:accessor default-content-type
:initarg :content-type
@@ -74,9 +74,11 @@
:initform nil)))
(defun app-state (key &optional (app *app*))
+ "Fetch private app state by key. Key comparison is by EQUAL."
(gethash key (app-state-table app)))
(defun (setf app-state) (value key &optional (app *app*))
+ "Update the private app state by key. Key comparison is by EQUAL."
(setf (gethash key (app-state-table app)) value))