unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Mike Gran <spk121@yahoo.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-18-g904a78f
Date: Tue, 04 Aug 2009 18:11:24 +0200	[thread overview]
Message-ID: <m3vdl3blub.fsf@pobox.com> (raw)
In-Reply-To: <1249149509.12325.7535.camel@localhost.localdomain> (Mike Gran's message of "Sat, 01 Aug 2009 10:58:29 -0700")

Hi Mike,

Another niggle:

On Sat 01 Aug 2009 19:58, Mike Gran <spk121@yahoo.com> writes:

> On Fri, 2009-07-31 at 01:21 +0200, Ludovic Courtès wrote:
>> "Michael Gran" <spk121@yahoo.com> writes:
>> > +#define SCM_MAKE_CHAR(x) ({scm_t_int32 _x = (x);                        \
>> > +      _x < 0                                                            \
>> > +        ? SCM_MAKE_ITAG8((scm_t_bits)(unsigned char)_x, scm_tc8_char)   \
>> > +        : SCM_MAKE_ITAG8((scm_t_bits)_x, scm_tc8_char);})
>> 
>> This macro uses a GCC extension, which is not acceptable for Guile.  Can
>> you please rewrite it in standard C?  (The only risk is multiple
>> expansion of X, but that's OK.)
>
> OK.  There was one case of multiple expansion causing side effects, but,
> I fixed that.

Could we not just fix invokers of SCM_MAKE_CHAR() with negative values?
Are there instances of this outside Guile's source tree whose behavior
we need to preserve? That would avoid the multiple expansion problem
neatly, which the future would appreciate.

>> Does X < 0 mean ASCII?  And why is it truncated to 8 bits?  A comment
>> just above indicating the encoding trick would be handy IMO.
>
> OK.  Wide chars are always positive, but, the upper 128 of signed 8-bit
> C chars are negative, which is the reason for that logic.

I see. How irritating. Well, I guess that's fine, then -- barring a
requirement for SCM_LITERAL_CHAR or something.

>> Style (extraneous braces).
>
> Noted.  If that's the standard then so be it.   But, for this case, I
> declare, in classic flamewar fashion, that the standard is nonsense.

:)

It is better that we follow the standard, though.

Cheers,

Andy
-- 
http://wingolog.org/




      reply	other threads:[~2009-08-04 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1MW9af-0007pM-IW@cvs.savannah.gnu.org>
2009-07-30 23:21 ` [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-18-g904a78f Ludovic Courtès
2009-08-01 17:58   ` Mike Gran
2009-08-04 16:11     ` Andy Wingo [this message]

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3vdl3blub.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=spk121@yahoo.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).