lib/sod-hosted.c (sod_makev): Use two statements rather than tricky expression.
[sod] / src / c-types-parse.lisp
index 3a5a536..d0b3d41 100644 (file)
@@ -68,9 +68,9 @@
   ;; Despite the fact that it looks pretty trivial, this can't be done with
   ;; `defstruct' for the simple reason that we add more methods to the
   ;; accessor functions later.
-  ((label :type keyword :initarg :label :reader ds-label)
+  ((%label :type keyword :initarg :label :reader ds-label)
    (name :type string :initarg :name :reader ds-name)
-   (kind :type (member type complexity sign size qualifier specs)
+   (kind :type (member %type complexity sign size qualifier %specs)
         :initarg :kind :reader ds-kind)
    (taggedp :type boolean :initarg :taggedp
            :initform nil :reader ds-taggedp))
@@ -89,7 +89,7 @@
 
 (defparameter *declspec-map*
   (let ((map (make-hash-table :test #'equal)))
-    (dolist (item '((type :char :int :float :double)
+    (dolist (item '((%type :char :int :float :double)
                    (complexity (:complex :compat "_Complex")
                                (:imaginary :compat "_Imaginary"))
                    ((type :taggedp t) :enum :struct :union)
            (if (consp spec) spec (list spec)))
        (dolist (spec (cdr item))
          (destructuring-bind (label
-                              &key
-                              (name (string-downcase label))
-                              compat
-                              (taggedp taggedp))
+                              &key (name (string-downcase label))
+                                   compat (taggedp taggedp))
              (if (consp spec) spec (list spec))
            (let ((ds (make-instance 'declspec
                                     :label label
   (:documentation "Carrier for a storage specifier."))
 
 (defmethod ds-label ((spec storespec)) spec)
-(defmethod ds-kind ((spec storespec)) 'specs)
+(defmethod ds-kind ((spec storespec)) '%specs)
 
 (defmethod ds-label ((ty c-type)) :c-type)
 (defmethod ds-name ((ty c-type)) (princ-to-string ty))
-(defmethod ds-kind ((ty c-type)) 'type)
+(defmethod ds-kind ((ty c-type)) '%type)
 
 ;; A collection of declaration specifiers, and how to merge them together.
 
 (defclass declspecs ()
   ;; This could have been done with `defstruct' just as well, but a
   ;; `defclass' can be tweaked interactively, which is a win at the moment.
-  ((type :initform nil :initarg :type :reader ds-type)
+  ((%type :initform nil :initarg :type :reader ds-type)
    (complexity :initform nil :initarg :complexity :reader ds-complexity)
    (sign :initform nil :initarg :sign :reader ds-sign)
    (size :initform nil :initarg :size :reader ds-size)
-   (specs :initform nil :initarg :specs :reader ds-specs)
+   (%specs :initform nil :initarg :specs :reader ds-specs)
    (qualifier :initform nil :initarg :qualifiers :reader ds-qualifiers))
   (:documentation "Represents a collection of declaration specifiers.