X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftypep.lisp;h=0df87b1c2f89099f845d35ef37ee4d2a01423e3e;hb=0b96758f3645dff3e681d82cc97ddab1faae27ac;hp=121e2054de636c98e91c2b476522ddc5eadd51ae;hpb=98a76d4426660876dec6649b1e228d2e5b47f579;p=sbcl.git diff --git a/src/code/typep.lisp b/src/code/typep.lisp index 121e205..0df87b1 100644 --- a/src/code/typep.lisp +++ b/src/code/typep.lisp @@ -117,6 +117,14 @@ (and (consp object) (%%typep (car object) (cons-type-car-type type)) (%%typep (cdr object) (cons-type-cdr-type type)))) + (character-set-type + (and (characterp object) + (let ((code (char-code object)) + (pairs (character-set-type-pairs type))) + (dolist (pair pairs nil) + (destructuring-bind (low . high) pair + (when (<= low code high) + (return t))))))) (unknown-type ;; dunno how to do this ANSIly -- WHN 19990413 #+sb-xc-host (error "stub: %%TYPEP UNKNOWN-TYPE in xcompilation host")