Skip to content

Commit

Permalink
closql--slot-properties: New function
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed May 30, 2024
1 parent 2caa56a commit b4b3f24
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions closql.el
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,13 @@
(symbol-name (if (symbolp tbl) tbl (car tbl))))))))

(defun closql--slot-get (object-or-class slot prop)
(let ((s (cl-find slot
(closql--object-slots object-or-class)
:key #'cl--slot-descriptor-name)))
(and s (cdr (assoc prop (cl--slot-descriptor-props s))))))
(cdr (assq prop (closql--slot-properties object-or-class slot))))

(defun closql--slot-properties (object-or-class slot)
(and-let* ((desc (cl-find slot
(closql--object-slots object-or-class)
:key #'cl--slot-descriptor-name)))
(cl--slot-descriptor-props desc)))

(defun closql--object-slots (object-or-class)
(eieio-class-slots
Expand Down

0 comments on commit b4b3f24

Please sign in to comment.