;;;----- Licensing notice ---------------------------------------------------
;;;
-;;; This file is part of the Sensble Object Design, an object system for C.
+;;; This file is part of the Sensible Object Design, an object system for C.
;;;
;;; SOD is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
',aliases)))
(export 'defctype)
-(defmacro defctype (names value)
+(defmacro defctype (names value &key export)
"Define NAMES all to describe the C-type VALUE.
NAMES can be a symbol (treated as a singleton list), or a list of symbols.
(namevar (gensym "NAME"))
(typevar (symbolicate 'c-type- (car names))))
`(progn
+ ,@(and export
+ `((export '(,typevar ,@names))))
(defparameter ,typevar ,(expand-c-type-spec value))
(eval-when (:compile-toplevel :load-toplevel :execute)
,@(mapcar (lambda (name)
&aux (%type type)))
(:predicate argumentp))
"Simple structure representing a function argument."
- name
- %type)
-(define-access-wrapper argument-type argument-%type)
+ (name nil :type t :read-only t)
+ (%type nil :type c-type :read-only t))
+(define-access-wrapper argument-type argument-%type :read-only t)
(export 'commentify-argument-name)
(defgeneric commentify-argument-name (name)