X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/93348ae9e276dec213b5d543338b1e2c53a7b687..01e3faf9aaf5674955083ae7b190fcc84d35afbd:/src/c-types-proto.lisp diff --git a/src/c-types-proto.lisp b/src/c-types-proto.lisp index a2c57cd..a13be4c 100644 --- a/src/c-types-proto.lisp +++ b/src/c-types-proto.lisp @@ -7,7 +7,7 @@ ;;;----- 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 @@ -181,7 +181,7 @@ ,@doc (destructuring-bind ,bvl ,tail ,@decls - ,@body)) + (block ,name ,@body))) ',name)))) (export 'c-type-alias) @@ -239,11 +239,13 @@ ;;; Function arguments. (export '(argument argumentp make-argument argument-name argument-type)) -(defstruct (argument (:constructor make-argument (name type)) +(defstruct (argument (:constructor make-argument (name type + &aux (%type type))) (:predicate argumentp)) "Simple structure representing a function argument." - name - 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) @@ -251,7 +253,7 @@ "Produce a `commentified' version of the argument. The default behaviour is that temporary argument names are simply omitted - (NIL is returned); otherwise, `/*...*/' markers are wrapped around the + (nil is returned); otherwise, `/*...*/' markers are wrapped around the printable representation of the argument.") (:method ((name null)) nil) (:method ((name t)) (format nil "/*~A*/" name)))