X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/ee4d9781081e74e6d56b5e808d7e37a5c9d7565c..f4ba8dcb96baefeab615d39c901769b7136e32aa:/glib/utils.lisp diff --git a/glib/utils.lisp b/glib/utils.lisp index fa11693..b1b402c 100644 --- a/glib/utils.lisp +++ b/glib/utils.lisp @@ -15,16 +15,18 @@ ;; License along with this library; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -;; $Id: utils.lisp,v 1.1 2004-10-27 14:50:15 espen Exp $ +;; $Id: utils.lisp,v 1.3 2005-02-03 23:09:05 espen Exp $ (in-package "GLIB") (defun type-expand-1 (form) (let ((def (cond ((symbolp form) - (kernel::info type expander form)) + #+cmu(kernel::info type expander form) + #+sbcl(sb-impl::info :type :expander form)) ((and (consp form) (symbolp (car form))) - (kernel::info type expander (car form))) + #+cmu(kernel::info type expander (car form)) + #+sbcl(sb-impl::info :type :expander (car form))) (t nil)))) (if def (values (funcall def (if (consp form) form (list form))) t) @@ -45,15 +47,16 @@ (defmacro with-gc-disabled (&body body) (let ((gc-inhibit (make-symbol "GC-INHIBIT"))) `(progn - (let ((,gc-inhibit lisp::*gc-inhibit*)) - (ext:gc-off) + (let ((,gc-inhibit #+cmu lisp::*gc-inhibit* + #+sbcl sb-impl::*gc-inhibit*)) + (gc-off) (unwind-protect ,@body (unless ,gc-inhibit - (ext:gc-on))))))) + (gc-on))))))) (defun mklist (obj) - (if (atom obj) (list obj) obj)) + (if (and obj (atom obj)) (list obj) obj)) (defun namep (obj) (and (symbolp obj) (not (member obj '(t nil))))) @@ -117,8 +120,6 @@ (defun split-string (string delimiter) (declare (simple-string string) (character delimiter)) - (check-type string string) - (check-type delimiter character) (let ((pos (position delimiter string))) (if (not pos) (list string) @@ -128,8 +129,6 @@ (defun split-string-if (string predicate) (declare (simple-string string)) - (check-type string string) - (check-type predicate (or symbol function)) (let ((pos (position-if predicate string :start 1))) (if (not pos) (list string)