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/063449.html below:

[Python-Dev] PY_SSIZE_T_MIN?

[Python-Dev] PY_SSIZE_T_MIN? [Python-Dev] PY_SSIZE_T_MIN?Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Apr 5 19:54:13 CEST 2006
Congratulations to the Python 2.5a1 release! I started adjusting Boost.Python
to work with this new release and it is going very well. I noticed this #define
in pyport.h:

#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))

However, I couldn't find a corresponding PY_SSIZE_T_MIN which would come in
handy to adjust old code using INT_MIN (from limits.h). Are there arguments
against defining PY_SSIZE_T_MIN? Or is this just an oversight?

Objects/longobject.c uses:

  return -PY_SSIZE_T_MAX-1;

To maximize consistency this would seem ideal to me:

pyport.h:

#define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1)

longobject.c:

  return PY_SSIZE_T_MIN;

Cheers,
        Ralf


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
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