From: Chris Hanson Date: Tue, 25 Feb 2003 20:37:28 +0000 (+0000) Subject: Add GUARANTEE-LIMITED-INDEX-FIXNUM. X-Git-Tag: 20090517-FFI~2018 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ec736f402dd4b5a654cd2a60461c7e45232968fa;p=mit-scheme.git Add GUARANTEE-LIMITED-INDEX-FIXNUM. --- diff --git a/v7/src/runtime/fixart.scm b/v7/src/runtime/fixart.scm index 8b4b0706f..0b19cb136 100644 --- a/v7/src/runtime/fixart.scm +++ b/v7/src/runtime/fixart.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: fixart.scm,v 1.11 2003/02/25 20:35:26 cph Exp $ +$Id: fixart.scm,v 1.12 2003/02/25 20:37:28 cph Exp $ Copyright 1994,1996,1999,2000,2001,2003 Massachusetts Institute of Technology @@ -112,6 +112,10 @@ USA. (if (not (index-fixnum? object)) (error:wrong-type-argument object "index integer" caller))) +(define (guarantee-limited-index-fixnum object limit caller) + (if (not (and (index-fixnum? object) (fix:< object limit))) + (error:wrong-type-argument object "limitied index integer" caller))) + (define-integrable (fix:<= x y) (not (fix:> x y)))