Support for querying foreign type designators
Bug #1881118 reported by
Wilfredo Velázquez-Rodríguez
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CFFI |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
I am writing an API that uses CFFI underneath and have had the need to check if a designator for a foreign type (such as :uint8, or another user-defined type) actually designates a foreign type.
The most sane way I've found to do this is the following:
(defun foreign-type-p (foreign-type)
(handler-case (and (cffi::parse-type foreign-type) t)
(error () nil)))
I feel that there should be a better way to go about this
Changed in cffi: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
To post a comment you must log in.
Sounds reasonable. Can you tell me a bit more about your API and why you need this feature?