From 7ca1b1eff75521ed91b4efb4d69f90df6e1fa851 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 26 May 2016 09:26:09 +0100 Subject: [PATCH] src/c-types-parse.lisp: Hoist up the `ds-FOO' methods for raw types. Having them just after the definition of `declspecs' doesn't seem to make a great deal of sense. --- src/c-types-parse.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/c-types-parse.lisp b/src/c-types-parse.lisp index 58e3ced..4475c72 100644 --- a/src/c-types-parse.lisp +++ b/src/c-types-parse.lisp @@ -119,6 +119,10 @@ map) "Maps symbolic labels and textual names to `declspec' instances.") +(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) + ;; A collection of declaration specifiers, and how to merge them together. (defclass declspecs () @@ -143,10 +147,6 @@ collection isn't good, I must roll back to the previous version. So I don't get to take advantage of a mutable structure.)")) -(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) - (defparameter *good-declspecs* '(((:int) (:signed :unsigned) (:short :long :long-long) ()) ((:char) (:signed :unsigned) () ()) -- 2.11.0