[Python-Dev] ssize_t branch merged
oliphant.travis at ieee.org
Sat Feb 18 02:37:32 CET 2006
Thomas Wouters wrote:
> On Fri, Feb 17, 2006 at 04:40:08PM -0700, Travis Oliphant wrote:
>>What is PY_SSIZE_T_MAX supposed to be? The definition in pyport.h
Maybe I have the wrong version of code. In my pyport.h (checked out
from svn trunk) I have.
#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))
What is size_t? Is this supposed to be sizeof(size_t)?
I get a syntax error when I actually use PY_SSIZE_T_MAX somewhere in the
> While looking at the piece of code in Include/pyport.h I do notice that the
> fallback (when ssize_t is not available) is to Py_uintptr_t... Which is an
> unsigned type, while ssize_t is supposed to be signed. Martin, is that on
> purpose? I don't have any systems that lack ssize_t. ;P
I saw the same thing and figured it was an error.
> Adapting all code in the right way isn't finished yet (not in the last place
> because some of the code is... how shall I put it... 'creative'.)
I'm just trying to adapt my __index__ patch to use ssize_t. I realize
this was a big change and will take some "adjusting." I can help with
that if needed as I do have some experience here. I just want to make
sure I fully understand what issues Martin and others are concerned about.
More information about the Python-Dev