X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=base%2Fcmucl-compat.lisp;h=3da769492d82e0cf8583f66d24b4d5c05bac03d6;hb=0140f390dc26d640b2289c212da82e5b3f51106f;hp=a479bc1e687181d3a61ce0fa718c55425c4efbba;hpb=4099b4c8ddcdd7d48ca44d3f9efc43063042bea1;p=clsql.git diff --git a/base/cmucl-compat.lisp b/base/cmucl-compat.lisp index a479bc1..3da7694 100644 --- a/base/cmucl-compat.lisp +++ b/base/cmucl-compat.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: cmucl-compat.lisp,v 1.1 2002/09/30 10:19:01 kevin Exp $ +;;;; $Id: cmucl-compat.lisp,v 1.2 2002/10/14 04:09:02 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -20,6 +20,7 @@ (in-package :cl-user) (defpackage :cmucl-compat + (:use #:common-lisp) (:export #:shrink-vector #:make-sequence-of-type @@ -40,7 +41,11 @@ (defmacro shrink-vector (vec len) `(lisp::shrink-vector ,vec ,len)) -#-cmu +#+sbcl +(defmacro shrink-vector (vec len) + `(sb-kernel::shrink-vector ,vec ,len)) + +#-(or cmu sbcl) (defmacro shrink-vector (vec len) "Shrinks a vector. Optimized if vector has a fill pointer. Needs to be a macro to overwrite value of VEC." @@ -64,7 +69,7 @@ Needs to be a macro to overwrite value of VEC." -#-cmu +#-(or cmu sbcl) (defun make-sequence-of-type (type length) "Returns a sequence of the given TYPE and LENGTH." (declare (fixnum length)) @@ -91,9 +96,12 @@ Needs to be a macro to overwrite value of VEC." (lisp::make-sequence-of-type type len)) (defun make-sequence-of-type (type len) (system::make-sequence-of-type type len))) - -#-cmu +#+sbcl +(defun make-sequence-of-type (type len) + (sb-impl::make-sequence-of-type type len)) + +#-(or cmu sbcl) (defun result-type-or-lose (type nil-ok) (unless (or type nil-ok) (error "NIL output type invalid for this sequence function")) @@ -113,3 +121,7 @@ Needs to be a macro to overwrite value of VEC." #+cmu (defun result-type-or-lose (type nil-ok) (lisp::result-type-or-lose type nil-ok)) + +#+sbcl +(defun result-type-or-lose (type nil-ok) + (sb-impl::result-type-or-lose type nil-ok))