X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/65b1d9d7baec2f81b713122356955d195971f1aa..ff4e398b224974d6283f71aa78daef4210371e32:/src/c-types-proto.lisp diff --git a/src/c-types-proto.lisp b/src/c-types-proto.lisp index c8aa72e..1057321 100644 --- a/src/c-types-proto.lisp +++ b/src/c-types-proto.lisp @@ -57,6 +57,16 @@ The qualifiers of the returned type are the union of the requested QUALIFIERS and the qualifiers already applied to TYPE.")) +(export 'c-qualifier-keyword) +(defgeneric c-qualifier-keyword (qualifier) + (:documentation "Return the C keyword for the QUALIFIER (a Lisp keyword).") + (:method ((qualifier symbol)) (string-downcase qualifier))) + +(export 'c-type-qualifier-keywords) +(defun c-type-qualifier-keywords (c-type) + "Return the type's qualifiers, as a list of C keyword names." + (mapcar #'c-qualifier-keyword (c-type-qualifiers c-type))) + (export 'c-type-subtype) (defgeneric c-type-subtype (type) (:documentation