Re: [Python-Dev] int vs ssize_t in unicode

2006-04-14 Thread Neal Norwitz
On 4/13/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Neal Norwitz wrote: > > I just grepped for INT_MAX and there's a ton of them still (well 83 in > > */*.c). Some aren't an issue like posixmodule.c, those are > > _SC_INT_MAX. marshal is probably ok, but all uses should be verified. > > R

Re: [Python-Dev] int vs ssize_t in unicode

2006-04-13 Thread Martin v. Löwis
Neal Norwitz wrote: > I just grepped for INT_MAX and there's a ton of them still (well 83 in > */*.c). Some aren't an issue like posixmodule.c, those are > _SC_INT_MAX. marshal is probably ok, but all uses should be verified. > Really all uses of {INT,LONG}_{MIN,MAX} should be verified and > con

Re: [Python-Dev] int vs ssize_t in unicode

2006-04-13 Thread Neal Norwitz
On 4/12/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > 235: > > assert(length > unicode->length = (int)length; > > Right: I just changed it. It may date back to a version of the patch > where I only changed the signatures of the functions, but not the > object layout. I just gr

Re: [Python-Dev] int vs ssize_t in unicode

2006-04-12 Thread Martin v. Löwis
Neal Norwitz wrote: > In Include/ucnhash.h I notice some integers and wonder if those should > be Py_ssize_t. It looks like they are just names so they should be > pretty short. Right: int size is below 100; the name length of a Unicode character is below 40 (I believe). OTOH, changing them to Py

[Python-Dev] int vs ssize_t in unicode

2006-04-12 Thread Neal Norwitz
Martin, In Include/ucnhash.h I notice some integers and wonder if those should be Py_ssize_t. It looks like they are just names so they should be pretty short. But in Objects/unicodeobject.c, I notice a bunch of ints and casts to int and wonder if they should be changed to Py_ssize_t/removed: 2