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))))
+1 -1
View File
@@ -71,7 +71,7 @@
;; pick the 1-char tag off from the remainder of the line
(set! tag (string-ref line 0))
(set! value (make-shared-substring line 1))
(set! value (substring line 1))
;; now do something with the line
(if
+1 -1
View File
@@ -28,7 +28,7 @@
(if (and (string? line)
(not (string=? line "")))
(let ((tag (string-ref line 0))
(value (make-shared-substring line 1)))
(value (substring line 1)))
(set! byte-count (+ (string-length line) byte-count))
(case tag
((#\^) #t)
+2 -2
View File
@@ -197,7 +197,7 @@ the current value of the path.")
(gnc:debug "handling arg " item)
(if (not (string=? "--"
(make-shared-substring item 0
(substring item 0
(min (string-length item) 2))))
(begin
(gnc:debug "non-option " item ", assuming file")
@@ -208,7 +208,7 @@ the current value of the path.")
;; ignore --
(set! rest (cdr rest))
;; Got something that looks like an option...
(let* ((arg-string (make-shared-substring item 2))
(let* ((arg-string (substring item 2))
(arg-def (assoc-ref gnc:*arg-defs* arg-string)))
(if (not arg-def)