From 2c6153373f927d948a74b283ebb16330af8ee49a Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 6 Oct 2019 22:26:27 +0100 Subject: [PATCH] c-types-proto.lisp (canonify-qualifiers): Delete `nil' entries. Now you can decide whether to include a qualifier by saying `(and COND :const)' or similar, and the `nil' if COND is false will be swept under the rug. --- src/c-types-proto.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/c-types-proto.lisp b/src/c-types-proto.lisp index 43824da..0ce2cf3 100644 --- a/src/c-types-proto.lisp +++ b/src/c-types-proto.lisp @@ -46,8 +46,11 @@ (export 'canonify-qualifiers) (defun canonify-qualifiers (qualifiers) - "Return a canonical list of qualifiers." - (delete-duplicates (sort (copy-list qualifiers) #'string<))) + "Return a canonical list of qualifiers. + + Duplicates and `nil' entries are deleted, and the remaining entries are + sorted." + (sort (delete-duplicates (delete nil (copy-list qualifiers))) #'string<)) (export 'qualify-c-type) (defgeneric qualify-c-type (type qualifiers) -- 2.11.0