From b5c8ba347cb82a9332d0e7260be5842a7ee281ba Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 26 May 2016 09:26:09 +0100 Subject: [PATCH 1/1] src/c-types-{impl,parse}.tex: Support `_Atomic' types. blah blah --- src/c-types-impl.lisp | 5 +++++ src/c-types-parse.lisp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/c-types-impl.lisp b/src/c-types-impl.lisp index ce3aedf..be679a0 100644 --- a/src/c-types-impl.lisp +++ b/src/c-types-impl.lisp @@ -82,6 +82,11 @@ new-type-class initargs)) +;;;-------------------------------------------------------------------------- +;;; Qualifiers. + +(defmethod c-qualifier-keyword ((qualifier (eql :atomic))) "_Atomic") + (defmethod qualify-c-type ((type qualifiable-c-type) qualifiers) (let ((initargs (instance-initargs type))) (remf initargs :qualifiers) diff --git a/src/c-types-parse.lisp b/src/c-types-parse.lisp index 2c0e725..4244d3e 100644 --- a/src/c-types-parse.lisp +++ b/src/c-types-parse.lisp @@ -96,7 +96,8 @@ ((type :taggedp t) :enum :struct :union) (size :short :long (:long-long :name "long long")) (sign :signed :unsigned) - (qualifier :const :restrict :volatile))) + (qualifier :const :restrict :volatile + (:atomic :compat "_Atomic")))) (destructuring-bind (kind &key (taggedp nil)) (let ((spec (car item))) (if (consp spec) spec (list spec))) -- 2.11.0