guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-18-


From: Mike Gran
Subject: Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-18-g904a78f
Date: Sat, 01 Aug 2009 10:58:29 -0700

On Fri, 2009-07-31 at 01:21 +0200, Ludovic Court├Ęs wrote:
> "Michael Gran" <address@hidden> writes:
> My remark about user-visibility was actually regarding this commit, not
> the previous one.
> 
> > +#ifndef SCM_WCHAR_DEFINED
> > +typedef scm_t_int32 scm_t_wchar;
> > +#define SCM_WCHAR_DEFINED
> > +#endif
> 
> Why is this #ifdef hack needed?
> 

It was to work around a problem, which, apparently, I can no longer
reproduce.  So, it isn't needed.

> > +#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.

> 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.

>> +                  if (i<256)
>> +                    {
>> +                      /* Character is graphic.  Print it.  */
>> +                      scm_putc (i, port);
>> +                    }

> 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.

Thanks,

Mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]