2 (defvar *designator-types* (make-hash-table :test #'equal))
4 (defmacro define-designator (name (lisp-type alien-type) doc
6 (let ((designator-type `(or ,@(mapcar #'car conversions)))
7 (designator-name (intern (format nil "~A-~A"
9 (symbol-name :designator))
11 (name (intern (symbol-name name) :sb-posix)))
14 ,@(when doc (list (first doc)))
16 (deftype ,designator-name ()
17 ,@(when doc (list (second doc)))
19 (eval-when (:compile-toplevel :load-toplevel :execute)
20 (setf (gethash ',name *designator-types*) ',alien-type))
21 (declaim (ftype (function (t) (values ,lisp-type &optional)) ,name))
23 ,@(when doc (list (third doc)))