From: Mark Wooding Date: Sun, 30 Apr 2006 12:29:58 +0000 (+0100) Subject: base: Provide fixnump function. X-Git-Url: https://git.distorted.org.uk/~mdw/lisp/commitdiff_plain/7dcf04ad1295e4c19d0ad48b1b8cc4533cb8dd1e base: Provide fixnump function. CMU CL already implements fixnump in the extensions package Provide it explicitly here anyway, for other implementations. Quite why this function isn't in the Common Lisp spec anyway is still a mystery. --- diff --git a/mdw-base.lisp b/mdw-base.lisp index 269b398..0b68b8d 100644 --- a/mdw-base.lisp +++ b/mdw-base.lisp @@ -37,7 +37,10 @@ #:with-gensyms #:let*/gensyms #:with-places #:locp #:locf #:ref #:with-locatives #:update-place #:update-place-after - #:incf-after #:decf-after)) + #:incf-after #:decf-after + #:fixnump) + #+cmu (:import-from #:extensions #:fixnump)) + (in-package #:mdw.base) ;;;-------------------------------------------------------------------------- @@ -124,6 +127,13 @@ (and decls (list (cons 'declare decls))) forms)))))))) +#-cmu +(progn + (declaim (inline fixnump)) + (defun fixnump (object) + "Answer non-nil if OBJECT is a fixnum, or nil if it isn't." + (typep object 'fixnum))) + ;;;-------------------------------------------------------------------------- ;;; Generating symbols.