From 4e54eca87eb66e2743f98409c6a0cff49e473b40 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 10 Aug 2007 18:08:38 +0000 Subject: [PATCH] Change SYMBOL to use UTF8-STRING. Change SYMBOL-APPEND to be an alias for SYMBOL. --- v7/src/runtime/runtime.pkg | 3 ++- v7/src/runtime/symbol.scm | 22 ++-------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 7d85c9beb..2cf8c7e5f 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.622 2007/08/10 18:06:18 cph Exp $ +$Id: runtime.pkg,v 14.623 2007/08/10 18:08:37 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -491,6 +491,7 @@ USA. (files "symbol") (parent (runtime)) (export () + (symbol-append symbol) error:not-interned-symbol error:not-symbol error:not-uninterned-symbol diff --git a/v7/src/runtime/symbol.scm b/v7/src/runtime/symbol.scm index 86660c4f9..6b2f37ea0 100644 --- a/v7/src/runtime/symbol.scm +++ b/v7/src/runtime/symbol.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: symbol.scm,v 1.23 2007/01/05 21:19:28 cph Exp $ +$Id: symbol.scm,v 1.24 2007/08/10 18:08:38 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -81,17 +81,7 @@ USA. (substring->symbol string start (string-length string))) (define (symbol . objects) - ((ucode-primitive string->symbol) - (apply string-append (map ->utf8-string objects)))) - -(define (->utf8-string object) - (cond ((symbol? object) (symbol-name object)) - ((string? object) (string->utf8-string object)) - ((wide-string? object) (wide-string->utf8-string object)) - ((wide-char? object) (wide-string->utf8-string (wide-string object))) - ((number? object) (number->string object)) - ((not object) "") - (else (error:wrong-type-argument object "symbol component" 'SYMBOL)))) + ((ucode-primitive string->symbol) (apply utf8-string objects))) (define (intern string) ((ucode-primitive string->symbol) @@ -136,14 +126,6 @@ USA. (guarantee-symbol symbol 'SYMBOL-NAME) (system-pair-car symbol)) -(define (symbol-append . symbols) - ((ucode-primitive string->symbol) - (apply string-append - (map (lambda (symbol) - (guarantee-symbol symbol 'SYMBOL-APPEND) - (system-pair-car symbol)) - symbols)))) - (define (symbol-hash symbol) (string-hash (symbol-name symbol))) -- 2.25.1