Changeset 37817 in project


Ignore:
Timestamp:
08/04/19 14:24:29 (4 months ago)
Author:
sjamaan
Message:

srfi-13: Move the fixnum check before the zero check; this makes more sense

Otherwise you'll get an error about the non-fixnum from "zero?",
instead of from the check, which means you'll lose the location info.

File:
1 edited

Legend:

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

    r37814 r37817  
    10211021                                                        ;     (<= 0 bound)))
    10221022                                         rest)
     1023    (##sys#check-fixnum bound 'string-hash)
    10231024    (if (zero? bound) (set! bound 4194304))
    1024     (##sys#check-fixnum bound 'string-hash)
    10251025    (let-string-start+end (start end) string-hash s rest
    10261026      (%string-hash s char->integer bound start end))))
     
    10311031                                                         ;    (<= 0 bound)))
    10321032                                         rest)
     1033    (##sys#check-fixnum bound 'string-hash-ci)
    10331034    (if (zero? bound) (set! bound 4194304))
    1034     (##sys#check-fixnum bound 'string-hash-ci)
    10351035    (let-string-start+end (start end) string-hash-ci s rest
    10361036      (%string-hash s (lambda (c) (char->integer (char-downcase c)))
Note: See TracChangeset for help on using the changeset viewer.