OSDN Git Service

* utils-cgen.scm (parse-name): Don't assume that string-map can be
authorjimb <jimb>
Thu, 16 Dec 2004 21:24:07 +0000 (21:24 +0000)
committerjimb <jimb>
Thu, 16 Dec 2004 21:24:07 +0000 (21:24 +0000)
applied to symbols.  Process everything as strings, and then
convert to a symbol at the end.

cgen/ChangeLog
cgen/utils-cgen.scm

index 7db756c..93e6bfb 100644 (file)
@@ -1,5 +1,9 @@
 2004-12-16  Jim Blandy  <jimb@redhat.com>
 
+       * utils-cgen.scm (parse-name): Don't assume that string-map can be
+       applied to symbols.  Process everything as strings, and then
+       convert to a symbol at the end.
+
        * read.scm (debug-repl): Temporarily redirect input and output to
        /dev/tty while we debug, so we don't interfere with whatever CGEN
        is reading or writing.
index de24102..26bf694 100644 (file)
 ; FIXME: Isn't the plan to move ERRTXT to the 1st arg?
 
 (define (parse-name name errtxt)
-  (cond ((list? name)
-        (string->symbol (string-map (lambda (elm) (parse-name elm errtxt)) name)))
-       ((symbol? name) name)
-       ((string? name) (string->symbol name))
-       (else (parse-error errtxt "improper name" name)))
+  (string->symbol
+   (let parse ((name name))
+     (cond
+      ((list? name) (string-map parse name))
+      ((symbol? name) (symbol->string name))
+      ((string? name) name)
+      (else (parse-error errtxt "improper name" name)))))
 )
 
 ; Parse an object comment.