From 811b3c3abe8aeb40ecb73d31cc6ad68f0fdcba38 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 7 Jan 2018 15:32:33 -0500 Subject: [PATCH] Implement string->immutable. --- src/runtime/runtime.pkg | 1 + src/runtime/ustring.scm | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 34c08fc56..089bdb78f 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1001,6 +1001,7 @@ USA. nfc-string? string string* + string->immutable string->list string->nfc string->nfd diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index d799ca79e..d9fd1f21c 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -534,7 +534,7 @@ USA. ((2) (max-loop cp2-ref)) (else (max-loop cp3-ref)))) -(define (%string->immutable string) +(define (string->immutable string) (if (and (ustring? string) (%ustring-immutable? string)) string (unpack-slice string @@ -908,7 +908,7 @@ USA. nfc)) (let ((nfc (if (eq? #t (string-nfc-qc string 'string->nfc)) - (%string->immutable string) + (string->immutable string) (%string->nfc string)))) (ustring-in-nfc! nfc #t) nfc))) @@ -986,7 +986,7 @@ USA. (define (string->nfd string) (if (string-in-nfd? string) - (let ((result (%string->immutable string))) + (let ((result (string->immutable string))) (ustring-in-nfd! result #t) result) (canonical-decomposition&ordering string -- 2.25.1