X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/3dca7758421664a838c54b273bd9221f02072045..HEAD:/src/c-types-class-impl.lisp diff --git a/src/c-types-class-impl.lisp b/src/c-types-class-impl.lisp index da16cd2..2908d75 100644 --- a/src/c-types-class-impl.lisp +++ b/src/c-types-class-impl.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 @@ -68,7 +68,7 @@ (atypecase (gethash name *module-type-map*) (null nil) (c-class-type it) - (t (error "Type `~A' (~A) is not a class" name it)))) + (t (error "Type `~A' is not a class" name)))) (export 'make-class-type) (defun make-class-type (name &optional qualifiers) @@ -128,9 +128,13 @@ (export 'find-sod-class) (defun find-sod-class (name) "Return the `sod-class' object with the given NAME." - (aif (find-class-type name) - (or (c-type-class it) (error "Class `~A' is incomplete" name)) - (error "Type `~A' not known" name))) + (acond ((find-class-type name) + (or (c-type-class it) + (error "Class `~A' is incomplete" name))) + ((find-simple-c-type name) + (error "Type `~A' is not a class" name)) + (t + (error "Type `~A' not known" name)))) (export 'record-sod-class) (defun record-sod-class (class)