Travis E. Oliphant wrote:
> Why not just
>
> #if SIZEOF_SIZE_T == 2
> #define PY_SSIZE_T_MAX 0x7fff
> #elif SIZEOF_SIZE_T == 4
> #define PY_SSIZE_T_MAX 0x7fff
> #elif SIZEOF_SIZE_T == 8
> #define PY_SSIZE_T_MAX 0x7fff
> #elif SIZEOF_SIZE_T == 16
> #define PY_SSIZE_T_MAX 0x7
Martin v. Löwis wrote:
> Neal Norwitz wrote:
>
>>I suppose that might be nice, but would require configure magic. I'm
>>not sure how it could be done on Windows.
>
>
> Contributions are welcome. On Windows, it can be hard-coded.
>
> Actually, something like
>
> #if SIZEOF_SIZE_T == SIZEOF_INT
Neal Norwitz wrote:
> I suppose that might be nice, but would require configure magic. I'm
> not sure how it could be done on Windows.
Contributions are welcome. On Windows, it can be hard-coded.
Actually, something like
#if SIZEOF_SIZE_T == SIZEOF_INT
#define PY_SSIZE_T_MAX INT_MAX
#elif SIZEO
On 2/17/06, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
>
> I'm very sorry for my silliness. I do see the problem I was having now.
>Thank you for helping me out. I was assuming that PY_SSIZE_T_MAX
> could be used in a pre-processor statement like LONG_MAX and INT_MAX.
>
> In other words
>
Tim Peters wrote:
> [Travis Oliphant]
>
>>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?
>
>
> size_t is an unsigned integral type defined by, required by, and used
>
[Travis Oliphant]
> 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?
size_t is an unsigned integral type defined by, required by, and used
all over the place in standard C.
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
>>doesn't compile.
>
Maybe I have the wrong version of code. In my pyport.h (checked out
from svn trunk) I have.
#define PY_SSIZE_
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
> doesn't compile.
Why not? Does it give an error for your particular platform? What platform
is that? What are HAVE_SSIZE_T, SIZEOF_VOID_P and SIZEOF_SIZE_T defi
Martin v. Löwis wrote:
> Just in case you haven't noticed, I just merged
> the ssize_t branch (PEP 353).
>
> If you have any corrections to the code to make which
> you would consider bug fixes, just go ahead.
>
> If you are uncertain how specific problems should be resolved,
> feel free to ask.
Great! I'll mark the PEP as accepted. (Which doesn't mean you can't
update it if changes are found necessary.)
--Guido
On 2/15/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Just in case you haven't noticed, I just merged
> the ssize_t branch (PEP 353).
>
> If you have any corrections to the
10 matches
Mail list logo