Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure that srfi-13 string= and its string-comparison friends return …

…booleans on success

This corrects a deficiency which exists in the reference implementation
and fixes ticket #870.
  • Loading branch information...
commit 8f3051f01a184233cf4456b3fa5a9048b00a2ffe 1 parent 1a0ea97
@ursetto authored
Showing with 18 additions and 18 deletions.
  1. +18 −18 srfi-13.scm
View
36 srfi-13.scm
@@ -783,7 +783,7 @@
(or (and (eq? s1 s2) (= start1 start2)) ; Fast path
(%string-compare s1 start1 end1 s2 start2 end2 ; Real test
(lambda (i) #f)
- values
+ (lambda (i) (if i #t #f))
(lambda (i) #f))))))
(define (string<> s1 s2 . maybe-starts+ends)
@@ -792,9 +792,9 @@
(or (not (= (- end1 start1) (- end2 start2))) ; Fast path
(and (not (and (eq? s1 s2) (= start1 start2))) ; Quick filter
(%string-compare s1 start1 end1 s2 start2 end2 ; Real test
- values
+ (lambda (i) (if i #t #f))
(lambda (i) #f)
- values)))))
+ (lambda (i) (if i #t #f)))))))
(define (string< s1 s2 . maybe-starts+ends)
(let-string-start+end2 (start1 end1 start2 end2)
@@ -803,7 +803,7 @@
(< end1 end2)
(%string-compare s1 start1 end1 s2 start2 end2 ; Real test
- values
+ (lambda (i) (if i #t #f))
(lambda (i) #f)
(lambda (i) #f)))))
@@ -816,7 +816,7 @@
(%string-compare s1 start1 end1 s2 start2 end2 ; Real test
(lambda (i) #f)
(lambda (i) #f)
- values))))
+ (lambda (i) (if i #t #f))))))
(define (string<= s1 s2 . maybe-starts+ends)
(let-string-start+end2 (start1 end1 start2 end2)
@@ -825,8 +825,8 @@
(<= end1 end2)
(%string-compare s1 start1 end1 s2 start2 end2 ; Real test
- values
- values
+ (lambda (i) (if i #t #f))
+ (lambda (i) (if i #t #f))
(lambda (i) #f)))))
(define (string>= s1 s2 . maybe-starts+ends)
@@ -837,8 +837,8 @@
(%string-compare s1 start1 end1 s2 start2 end2 ; Real test
(lambda (i) #f)
- values
- values))))
+ (lambda (i) (if i #t #f))
+ (lambda (i) (if i #t #f))))))
(define (string-ci= s1 s2 . maybe-starts+ends)
(let-string-start+end2 (start1 end1 start2 end2)
@@ -847,7 +847,7 @@
(or (and (eq? s1 s2) (= start1 start2)) ; Fast path
(%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test
(lambda (i) #f)
- values
+ (lambda (i) (if i #t #f))
(lambda (i) #f))))))
(define (string-ci<> s1 s2 . maybe-starts+ends)
@@ -856,9 +856,9 @@
(or (not (= (- end1 start1) (- end2 start2))) ; Fast path
(and (not (and (eq? s1 s2) (= start1 start2))) ; Quick filter
(%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test
- values
+ (lambda (i) (if i #t #f))
(lambda (i) #f)
- values)))))
+ (lambda (i) (if i #t #f)))))))
(define (string-ci< s1 s2 . maybe-starts+ends)
(let-string-start+end2 (start1 end1 start2 end2)
@@ -867,7 +867,7 @@
(< end1 end2)
(%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test
- values
+ (lambda (i) (if i #t #f))
(lambda (i) #f)
(lambda (i) #f)))))
@@ -880,7 +880,7 @@
(%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test
(lambda (i) #f)
(lambda (i) #f)
- values))))
+ (lambda (i) (if i #t #f))))))
(define (string-ci<= s1 s2 . maybe-starts+ends)
(let-string-start+end2 (start1 end1 start2 end2)
@@ -889,8 +889,8 @@
(<= end1 end2)
(%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test
- values
- values
+ (lambda (i) (if i #t #f))
+ (lambda (i) (if i #t #f))
(lambda (i) #f)))))
(define (string-ci>= s1 s2 . maybe-starts+ends)
@@ -901,8 +901,8 @@
(%string-compare-ci s1 start1 end1 s2 start2 end2 ; Real test
(lambda (i) #f)
- values
- values))))
+ (lambda (i) (if i #t #f))
+ (lambda (i) (if i #t #f))))))
;;; Hash
Please sign in to comment.
Something went wrong with that request. Please try again.