From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13564 invoked by alias); 13 Jun 2005 22:29:44 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 13550 invoked by uid 22791); 13 Jun 2005 22:29:39 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 13 Jun 2005 22:29:39 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j5DMTbjt030881 for ; Mon, 13 Jun 2005 18:29:37 -0400 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j5DMTau16353; Mon, 13 Jun 2005 18:29:37 -0400 To: cgen@sources.redhat.com Subject: PATCH: let .upcase and .downcase pmacros handle symbols From: Jim Blandy Date: Mon, 13 Jun 2005 22:29:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-q2/txt/msg00053.txt.bz2 This fixes another problem caused by tighter typechecking in modern versions of Guile. I've committed it. 2005-06-13 Jim Blandy * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols as well as strings. Index: cgen/pmacros.scm =================================================================== RCS file: /cvs/src/src/cgen/pmacros.scm,v retrieving revision 1.4 diff -c -p -r1.4 pmacros.scm *** cgen/pmacros.scm 14 Feb 2005 17:48:25 -0000 1.4 --- cgen/pmacros.scm 13 Jun 2005 22:26:06 -0000 *************** *** 424,436 **** ; .upcase - convert a string to uppercase (define (-pmacro-upcase str) ! (string-upcase str) ) ; .downcase - convert a string to lowercase (define (-pmacro-downcase str) ! (string-downcase str) ) ; .substring - get part of a string --- 424,442 ---- ; .upcase - convert a string to uppercase (define (-pmacro-upcase str) ! (cond ! ((string? str) (string-upcase str)) ! ((symbol? str) (string->symbol (string-upcase (symbol->string str)))) ! (else (-pmacro-error "invalid argument to .upcase" str))) ) ; .downcase - convert a string to lowercase (define (-pmacro-downcase str) ! (cond ! ((string? str) (string-downcase str)) ! ((symbol? str) (string->symbol (string-downcase (symbol->string str)))) ! (else (-pmacro-error "invalid argument to .downcase" str))) ) ; .substring - get part of a string