This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: make parse-name handle lists containing symbols properly


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]