From: Chris Hanson Date: Tue, 25 Feb 2003 20:35:26 +0000 (+0000) Subject: Add GUARANTEE-INDEX-FIXNUM. X-Git-Tag: 20090517-FFI~2019 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1d849ece53bb5346f2eb0f9af5e6f316b16b5929;p=mit-scheme.git Add GUARANTEE-INDEX-FIXNUM. --- diff --git a/v7/src/runtime/fixart.scm b/v7/src/runtime/fixart.scm index e3f7b0744..8b4b0706f 100644 --- a/v7/src/runtime/fixart.scm +++ b/v7/src/runtime/fixart.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: fixart.scm,v 1.10 2003/02/14 18:28:32 cph Exp $ +$Id: fixart.scm,v 1.11 2003/02/25 20:35:26 cph Exp $ -Copyright (c) 1988-2001 Massachusetts Institute of Technology +Copyright 1994,1996,1999,2000,2001,2003 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -108,6 +108,10 @@ USA. (flo:vector-ref floating-vector-ref 2) (flo:vector-set! floating-vector-set! 3)) +(define (guarantee-index-fixnum object caller) + (if (not (index-fixnum? object)) + (error:wrong-type-argument object "index integer" caller))) + (define-integrable (fix:<= x y) (not (fix:> x y)))