A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-April/063678.html below:

[Python-Dev] int vs ssize_t in unicode

[Python-Dev] int vs ssize_t in unicode [Python-Dev] int vs ssize_t in unicodeNeal Norwitz nnorwitz at gmail.com
Thu Apr 13 09:00:43 CEST 2006
On 4/12/06, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>
> > 235:
> >         assert(length<INT_MAX);
> >     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 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
converted to PY_SSIZE_T_{MIN,MAX} as appropriate.

There are only a few {INT,LONG}_MIN and 22 LONG_MAX.

I'll try to review these soon unless someone beats me to it.

n
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4