From 49fe8febb88fee0dcb8ed48cb2c218a3dd0af28c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 17 Feb 2017 14:58:04 -0800 Subject: [PATCH] Rename make-legacy-string to legacy-string-allocate. --- src/runtime/bytevector.scm | 2 +- src/runtime/runtime.pkg | 2 +- src/runtime/ustring.scm | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/runtime/bytevector.scm b/src/runtime/bytevector.scm index 8d0fc621d..f329d496c 100644 --- a/src/runtime/bytevector.scm +++ b/src/runtime/bytevector.scm @@ -275,7 +275,7 @@ USA. ;; Make sure UTF-8 bytevectors have null termination. (define (utf8-allocator k) - (legacy-string->bytevector (make-legacy-string k))) + (legacy-string->bytevector (legacy-string-allocate k))) (define string->utf8) (define string->utf16be) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index c10caa10c..9974db6d8 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1220,8 +1220,8 @@ USA. ;; vector->ustring ) (export (runtime bytevector) + legacy-string-allocate legacy-string? - make-legacy-string ustring->legacy-string) (export (runtime predicate-metadata) register-ustring-predicates!) diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index 5ac9521dc..f10acde85 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -126,11 +126,11 @@ USA. ;;;; String (define-primitives + (legacy-string? string? 1) + (legacy-string-allocate string-allocate 1) (legacy-string-length string-length 1) (legacy-string-ref string-ref 2) - (legacy-string-set! string-set! 3) - (legacy-string? string? 1) - (make-legacy-string string-allocate 1)) + (legacy-string-set! string-set! 3)) (define (ustring? object) (or (legacy-string? object) @@ -156,7 +156,7 @@ USA. (guarantee index-fixnum? k 'make-ustring) (if (fix:> k 0) (make-full-string k char) - (make-legacy-string 0))) + (legacy-string-allocate 0))) (define (make-full-string k #!optional char) (let ((v (make-cp-vector k))) @@ -212,7 +212,7 @@ USA. (8-bit? #t (and 8-bit? (ustring-8-bit? (car strings))))) ((not (pair? strings)) (if 8-bit? - (make-legacy-string n) + (legacy-string-allocate n) (make-full-string n)))))) (let loop ((strings strings) (i 0)) (if (pair? strings) @@ -225,7 +225,7 @@ USA. (let ((string (let ((n (length chars))) (if (every char-8-bit? chars) - (make-legacy-string n) + (legacy-string-allocate n) (make-full-string n))))) (do ((chars chars (cdr chars)) (i 0 (fix:+ i 1))) @@ -253,7 +253,7 @@ USA. (every-loop char-8-bit? full-string-ref string start end)) (define (%full-string->legacy-string string start end) - (let ((to (make-legacy-string (fix:- end start)))) + (let ((to (legacy-string-allocate (fix:- end start)))) (copy-loop legacy-string-set! to 0 full-string-ref string start end) to)) @@ -271,7 +271,7 @@ USA. (error:not-a ustring? string 'ustring-copy))))) (define legacy-string-copy - (x-copy-maker legacy-string-length legacy-string-ref make-legacy-string + (x-copy-maker legacy-string-length legacy-string-ref legacy-string-allocate legacy-string-set! 'string-copy)) (define (full-string-copy string #!optional start end) @@ -672,7 +672,7 @@ USA. (define (legacy-string-downcase string) (let ((end (legacy-string-length string))) - (let ((string* (make-legacy-string end))) + (let ((string* (legacy-string-allocate end))) (do ((i 0 (fix:+ i 1))) ((fix:= i end)) (legacy-string-set! string* i @@ -700,7 +700,7 @@ USA. (define (legacy-string-upcase string) (let ((end (legacy-string-length string))) - (let ((string* (make-legacy-string end))) + (let ((string* (legacy-string-allocate end))) (do ((i 0 (fix:+ i 1))) ((fix:= i end)) (legacy-string-set! string* i -- 2.25.1