From: Jim Blandy <jimb@redhat.com>
To: cgen@sources.redhat.com
Subject: RFA: make parse-name handle lists containing symbols properly
Date: Thu, 16 Dec 2004 17:08:00 -0000 [thread overview]
Message-ID: <vt2ekhqnpf0.fsf@zenia.home> (raw)
Not sure why the 1.6.4 porting work didn't catch this.
2004-12-13 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.
Index: cgen/utils-cgen.scm
===================================================================
RCS file: /cvs/cvsfiles/devo/cgen/utils-cgen.scm,v
retrieving revision 1.61
diff -c -p -r1.61 utils-cgen.scm
*** cgen/utils-cgen.scm 20 Oct 2003 01:25:22 -0000 1.61
--- cgen/utils-cgen.scm 16 Dec 2004 17:05:38 -0000
***************
*** 175,185 ****
; 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)))
)
; Parse an object comment.
--- 175,187 ----
; FIXME: Isn't the plan to move ERRTXT to the 1st arg?
(define (parse-name name errtxt)
! (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.
reply other threads:[~2004-12-16 17:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vt2ekhqnpf0.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=cgen@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).