[Top][All Lists]
[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 suppo
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 20:50:09 -0600 |
User-agent: |
Microsoft-Entourage/12.15.0.081119 |
On 05/04/09 7:25 PM, "保坂範行" <address@hidden> wrote:
> Hi. MichaelP, CAnthony.
>
> I believe that there is no support for Py_ssize_t in python 2.4
>
You are correct. It appears Christian was cleaning up code and introduced
this when he replaced size_t with Py_ssize_t . According to Python docs this
type wasn't defined until 2.5 .
One thing I might suggest is that we typedef Py_ssize_t to be a size_t (or
int) if Py_ssize_t isn't defined. Nori, If you modify gnubgmodule.h so that
these lines:
#if USE_PYTHON
#ifdef WIN32
/* needed for mingw inclusion of Python.h */
#ifndef _MSC_VER
#include <stdint.h>
#endif
#endif
#include <Python.h>
#endif
become:
#if USE_PYTHON
#ifdef WIN32
/* needed for mingw inclusion of Python.h */
#ifndef _MSC_VER
#include <stdint.h>
#endif
#endif
#include <Python.h>
#endif
#ifndef
typedef size_t Py_ssize_t;
#endif
#endif
Does this solve the problem for you?