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

Neal Norwitz nnorwitz at gmail.com
Fri Mar 28 05:24:40 CET 2008


I think it's fine to apply the change to Py_CHARMASK.  I'll change it.

On Thu, Mar 27, 2008 at 8:38 PM, Guido van Rossum <guido at python.org> wrote:
> 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/)
>
>
> _______________________________________________
>  Python-checkins mailing list
>  Python-checkins at python.org
>  http://mail.python.org/mailman/listinfo/python-checkins
>


More information about the Python-checkins mailing list