Teach the groveler to print cstruct types which are lists of symbols.
authorJoshua Elsasser <joshua@elsasser.org>
Sat, 24 Nov 2012 22:03:31 +0000 (17:03 -0500)
committerLuís Oliveira <loliveira@common-lisp.net>
Sun, 6 Jan 2013 20:53:17 +0000 (20:53 +0000)
This means that forms such as the following are allowed:

(cstruct foo "struct foo"
  (mybar "mybar" :type (:struct bar)))

grovel/grovel.lisp

index 4c2da1a..4f3599f 100644 (file)
@@ -505,7 +505,13 @@ int main(int argc, char**argv) {
           ((and symbol (not null))
            (c-print-symbol out type))
           (string
-           (c-format out "~A" type)))
+           (c-format out "~A" type))
+          (cons
+           (c-format out "(")
+           (dolist (sym type)
+             (c-print-symbol out sym)
+             (c-format out " "))
+           (c-format out ")")))
         (etypecase count
           (null t)
           (integer