[Python-checkins] r61969 - in python/trunk: Include/bytes_methods.h Objects/longobject.c Objects/unicodeobject.c Python/mystrtoul.c

Guido van Rossum guido at python.org
Fri Mar 28 04:38:59 CET 2008


I'm with Eric. Py_CHARMASK exists to make sure char values are
converted to unsigned regardless of the signedness of char. If some
compiler still thinks they are signed chars, something's wrong with
Py_CHARMASK (or with that compiler).

On Thu, Mar 27, 2008 at 2:59 AM, Eric Smith
<eric+python-dev at trueblade.com> wrote:
> neal.norwitz wrote:
>  > Author: neal.norwitz
>  > Date: Thu Mar 27 05:40:50 2008
>  > New Revision: 61969
>  >
>  > Modified:
>  >    python/trunk/Include/bytes_methods.h
>  >    python/trunk/Objects/longobject.c
>  >    python/trunk/Objects/unicodeobject.c
>  >    python/trunk/Python/mystrtoul.c
>  > Log:
>  > Fix warnings about using char as an array subscript.  This is not portable
>  > since char is signed on some platforms and unsigned on others.
>
>  Is there any reason not to make Py_CHARMASK just do the cast to
>  unsigned?  I see lots of other uses of Py_CHARMASK that potentially have
>  this same problem.
>
>
>
>  _______________________________________________
>  Python-checkins mailing list
>  Python-checkins at python.org
>  http://mail.python.org/mailman/listinfo/python-checkins
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-checkins mailing list