bug-gnubg
[Top][All Lists]
Advanced

[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


From: Michael Petch
Subject: Re: [Bug-gnubg] There is Py_ssize_t in gnnubg source, which is NOT supported until python 2.5
Date: Sun, 05 Apr 2009 22:51:44 -0600
User-agent: Microsoft-Entourage/12.15.0.081119

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
http://www.python.org/dev/peps/pep-0353/

#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
#endif


On 05/04/09 10:13 PM, "保坂範行" <address@hidden> wrote:

> Hi, MichealP.
> 
>> #ifndef Py_ssize_t
>> typedef size_t Py_ssize_t;
>> #endif
>> #endif
> 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.
> 
> Nori
> 
> 
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]