X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/aa14a4cddcb96b681d5c19a2ec8bad382f43b264..2bc73f786f7dc35ecff3e1484a6376aae1de4962:/src/pset-impl.lisp?ds=inline diff --git a/src/pset-impl.lisp b/src/pset-impl.lisp index e498deb..e340389 100644 --- a/src/pset-impl.lisp +++ b/src/pset-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 @@ -65,6 +65,15 @@ (defmethod coerce-property-value ((value symbol) (type (eql :symbol)) (wanted (eql :id))) (frob-identifier (symbol-name value))) +;;; Types. + +(defmethod coerce-property-value + ((value string) (type (eql :id)) (wanted (eql :type))) + (or (and (boundp '*module-type-map*) + (gethash value *module-type-map*)) + (find-simple-c-type value) + (error "Unknown type `~A'" value))) + ;;;-------------------------------------------------------------------------- ;;; Property sets.