Fix Bug#342736 by replacing "make-shared-substring" with "substring".

Guile 1.8 automatically shares strings as copy-on-write and no longer
   provides the "make-shared-substring" procedure.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14159 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker
2006-05-24 01:25:30 +00:00
parent 998edefcc8
commit 22ce233d1b
5 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -94,10 +94,10 @@
;; Values are URL-encoded, so url:decode must be called on each one.
(define (get-name pair)
(let ((p (string-index pair #\=)))
(and p (make-shared-substring pair 0 p))))
(and p (substring pair 0 p))))
(define (get-value pair)
(let ((p (string-index pair #\=)))
(and p (url:decode (make-shared-substring pair (+ p 1))))))
(and p (url:decode (substring pair (+ p 1))))))
(for-each (lambda (pair)
(let* ((name (get-name pair))
(value (get-value pair))
@@ -180,6 +180,6 @@
(str str))
(let ((pos (string-rindex str ch)))
(if pos
(loop (cons (make-shared-substring str (+ 1 pos)) fields)
(make-shared-substring str 0 pos))
(loop (cons (substring str (+ 1 pos)) fields)
(substring str 0 pos))
(cons str fields)))))
+4 -4
View File
@@ -116,9 +116,9 @@
(define (parse-status-line statline)
(let* ((first (string-index statline #\space))
(second (string-index statline #\space (1+ first))))
(list (make-shared-substring statline 0 first)
(make-shared-substring statline (1+ first) second)
(make-shared-substring statline (1+ second)))))
(list (substring statline 0 first)
(substring statline (1+ first) second)
(substring statline (1+ second)))))
;;; HTTP connection management functions.
@@ -299,4 +299,4 @@
(set! end (1- end)))
(if (< end st)
""
(make-shared-substring s st end))))
(substring s st end))))