chiark
/
gitweb
/
~mdw
/
sod
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/keyword.c (kw_parseempty): Use correct variable scanning `kwval' list.
[sod]
/
src
/
pset-proto.lisp
diff --git
a/src/pset-proto.lisp
b/src/pset-proto.lisp
index 764350a2fbfab93d664c26114555b4b41f496b29..f03ec51376746f0aaede4dceb291252b241a13bc 100644
(file)
--- a/
src/pset-proto.lisp
+++ b/
src/pset-proto.lisp
@@
-66,14
+66,8
@@
(define-access-wrapper p-type p-%type :read-only t)
(export 'decode-property)
(defgeneric decode-property (raw)
(:documentation "Decode a RAW value into a TYPE, VALUE pair.")
(export 'decode-property)
(defgeneric decode-property (raw)
(:documentation "Decode a RAW value into a TYPE, VALUE pair.")
- (:method ((raw symbol)) (values :symbol raw))
- (:method ((raw integer)) (values :int raw))
- (:method ((raw string)) (values :string raw))
- (:method ((raw character)) (values :char raw))
(:method ((raw property)) (values (p-type raw) (p-value raw)))
(:method ((raw property)) (values (p-type raw) (p-value raw)))
- (:method ((raw cons)) (values (car raw) (cdr raw)))
- (:method ((raw function)) (values :func raw))
- (:method ((raw c-type)) (values :type raw)))
+ (:method ((raw cons)) (values (car raw) (cdr raw))))
(export 'make-property)
(defun make-property (name raw-value &key type location seenp)
(export 'make-property)
(defun make-property (name raw-value &key type location seenp)
@@
-99,9
+93,10
@@
(defgeneric coerce-property-value (value type wanted)
;; say it didn't work.
(:method (value type wanted)
(if (eql type wanted) value
;; say it didn't work.
(:method (value type wanted)
(if (eql type wanted) value
- (error "Incorrect type: expected ~A but found ~A" wanted type)))
+ (error "Incorrect type: expected ~(~A~) but found ~(~A~)"
+ wanted type)))
- ;; If the caller asks for type T then give
hi
m the raw thing.
+ ;; If the caller asks for type T then give
the
m the raw thing.
(:method (value type (wanted (eql t)))
(declare (ignore type))
value))
(:method (value type (wanted (eql t)))
(declare (ignore type))
value))