Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun get-signals (obj)
- (declare (optimize (speed 0) (space 0) (debug 3)))
- (remove-if-not
- (lambda (it)
- (let ((instance-type (getf it 'make-instance)))
- (member instance-type '(sl-signal-binary sl-signal-number sl-signal-binary-lambda sl-signal-number-lambda))))
- (mapcar (lambda (it) (concatenate 'list (list :name (first it)) (cadr it)))
- (remove-if-not
- (lambda (it)
- (and
- (listp (cadr it))
- (equalp 'make-instance (caadr it))))
- (mapcar
- (lambda (slot)
- (list
- (c2mop:slot-definition-name slot)
- (c2mop:slot-definition-initform slot)))
- (c2mop:class-slots (find-class (type-of obj))))))))
Add Comment
Please, Sign In to add comment