[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] There is Py_ssize_t in gnnubg source, which is NOT supp
Re: [Bug-gnubg] There is Py_ssize_t in gnnubg source, which is NOT supported until python 2.5
Sun, 05 Apr 2009 22:51:44 -0600
Whether we put it in configure.in or inline, I've learned that we should be
doing this (Note the use of int instead of ssize_t) and the definitions of
PY_SSIZE_T_MAX and PY_SSIZE_T_MIN. There is a python article about preferred
methods of maintaining backwards compatibility at
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
On 05/04/09 10:13 PM, "保坂範行" <address@hidden> wrote:
> Hi, MichealP.
>> #ifndef Py_ssize_t
>> typedef size_t Py_ssize_t;
> It works.
> But I do not believe this is right way to fix.
> Maybe configure scripts task?
> When detecting python version,
> if got <2.5, then define Py_ssize_t.
|[Prev in Thread]
||[Next in Thread]|
- Re: [Bug-gnubg] There is Py_ssize_t in gnnubg source, which is NOT supported until python 2.5,
Michael Petch <=