guile-devel
[Top][All Lists]
Advanced

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

Re: uniform vector byte signed or unsigned


From: Neil Jerram
Subject: Re: uniform vector byte signed or unsigned
Date: Sat, 24 Jul 2004 11:28:23 +0100
User-agent: Mozilla/5.0 (X11; U; Linux 2.4.4-4GB i686; en-US; 0.8.1) Gecko/20010515

Kevin Ryde wrote:

In scm_cvref it looks like a byvect byte is fetched as a "char", which
is of course normally signed, but on some systems can be unsigned.

Is a byte meant to be treated as signed?  It's probably worth making
that explicit so scheme level stuff doesn't depend on the vagaries of
C type conventions.

Good spot. I've hit this on Windows, where it comes out as signed, and so I have to do a trivial conversion to an unsigned value.

My preference would be for the value to be unsigned in the first place, though.

Regards,
      Neil





reply via email to

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