Changeset 37833 in project


Ignore:
Timestamp:
08/04/19 14:39:07 (2 weeks ago)
Author:
sjamaan
Message:

srfi-69: Use ##sys#check-fixnum instead of ##sys#check-exact on bounds

In CHICKEN 4, ##sys#check-exact was what we now call ##sys#check-fixnum
but the SRFI-69 code hasn't been updated to match it.

Fixes #1631

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-69/trunk/srfi-69.scm

    r37722 r37833  
    207207  (unless (number? obj)
    208208    (##sys#signal-hook #:type 'number-hash "invalid number" obj) )
    209   (##sys#check-exact bound 'number-hash)
     209  (##sys#check-fixnum bound 'number-hash)
    210210  (%hash/limit (%number-hash obj randomization) bound) )
    211211
     
    221221(define (object-uid-hash obj #!optional (bound hash-default-bound)
    222222                         (randomization hash-default-randomization))
    223   (##sys#check-exact bound 'object-uid-hash)
     223  (##sys#check-fixnum bound 'object-uid-hash)
    224224  (%hash/limit (%object-uid-hash obj randomization) bound) )
    225225
     
    236236                     (randomization hash-default-randomization))
    237237  (##sys#check-symbol obj 'symbol-hash)
    238   (##sys#check-exact bound 'symbol-hash)
     238  (##sys#check-fixnum bound 'symbol-hash)
    239239  (%hash/limit (%symbol-hash obj randomization) bound) )
    240240
     
    257257                      (randomization hash-default-randomization))
    258258  (##sys#check-keyword obj 'keyword-hash)
    259   (##sys#check-exact bound 'keyword-hash)
     259  (##sys#check-fixnum bound 'keyword-hash)
    260260  (%hash/limit (%keyword-hash obj randomization) bound) )
    261261
     
    281281(define (eq?-hash obj #!optional (bound hash-default-bound)
    282282                  (randomization hash-default-randomization))
    283   (##sys#check-exact bound 'eq?-hash)
     283  (##sys#check-fixnum bound 'eq?-hash)
    284284  (%hash/limit (*eq?-hash obj randomization) bound) )
    285285
     
    307307(define (eqv?-hash obj #!optional (bound hash-default-bound)
    308308                   (randomization hash-default-randomization))
    309   (##sys#check-exact bound 'eqv?-hash)
     309  (##sys#check-fixnum bound 'eqv?-hash)
    310310  (%hash/limit (*eqv?-hash obj randomization) bound) )
    311311
     
    392392(define (equal?-hash obj #!optional (bound hash-default-bound)
    393393                     (randomization hash-default-randomization))
    394   (##sys#check-exact bound 'hash)
     394  (##sys#check-fixnum bound 'hash)
    395395  (%hash/limit (*equal?-hash obj randomization) bound) )
    396396
     
    402402                     (randomization hash-default-randomization))
    403403  (##sys#check-string str 'string-hash)
    404   (##sys#check-exact bound 'string-hash)
     404  (##sys#check-fixnum bound 'string-hash)
    405405  (let ((str (if start
    406406                 (let ((end (or end (##sys#size str))))
     
    414414                     (randomization hash-default-randomization))
    415415  (##sys#check-string str 'string-ci-hash)
    416   (##sys#check-exact bound 'string-ci-hash)
     416  (##sys#check-fixnum bound 'string-ci-hash)
    417417  (let ((str (if start
    418418                 (let ((end (or end (##sys#size str))))
     
    484484          (lambda (object bound)
    485485            (let ((hash (user-function object bound)))
    486               (##sys#check-exact hash 'hash user-function)
     486              (##sys#check-fixnum hash 'hash)
    487487              (if (and (fx< hash bound) (fx>= hash 0))
    488488                  hash
     
    567567            (let ([arg (car arguments)])
    568568              (unless (keyword? arg)
    569                 (##sys#check-exact arg 'make-hash-table)
     569                (##sys#check-fixnum arg 'make-hash-table)
    570570                (unless (fx< 0 arg)
    571571                  (error 'make-hash-table "invalid size" arg) )
     
    592592                            (set! hash val)]
    593593                          [(#:size)
    594                             (##sys#check-exact val 'make-hash-table)
     594                            (##sys#check-fixnum val 'make-hash-table)
    595595                            (unless (fx< 0 val)
    596596                              (error 'make-hash-table "invalid size" val) )
Note: See TracChangeset for help on using the changeset viewer.