From: Chris Hanson Date: Sun, 7 Jan 2018 20:36:18 +0000 (-0500) Subject: Make sure that a record's type name is an immutable string. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~400 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f7d0c88e1c674b830ce03fdebd135e0438d5380b;p=mit-scheme.git Make sure that a record's type name is an immutable string. --- diff --git a/src/runtime/record.scm b/src/runtime/record.scm index 932d4e521..2093dc393 100644 --- a/src/runtime/record.scm +++ b/src/runtime/record.scm @@ -175,7 +175,7 @@ USA. (define (record-type-name record-type) (guarantee-record-type record-type 'RECORD-TYPE-NAME) - (string-copy (%record-type-name record-type))) + (%record-type-name record-type)) (define (record-type-field-names record-type) (guarantee-record-type record-type 'RECORD-TYPE-FIELD-NAMES) @@ -488,7 +488,7 @@ USA. error?)))))) (define (->type-name object) - (cond ((string? object) object) + (cond ((string? object) (string->immutable object)) ((symbol? object) (symbol->string object)) (else (error:wrong-type-argument object "type name" #f))))