From: Chris Hanson Date: Sun, 7 Jan 2018 20:32:33 +0000 (-0500) Subject: Implement string->immutable. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~401 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=811b3c3abe8aeb40ecb73d31cc6ad68f0fdcba38;p=mit-scheme.git Implement string->immutable. --- 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