src/c-types-impl.lisp: Make string -> simple-c-type mapping more useful.
[sod] / src / pset-impl.lisp
index e3e505f..ecad712 100644 (file)
     ((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.