[Insight-developers] Re: python 2.5 fix

Brad King brad.king at kitware.com
Tue Jul 10 14:01:32 EDT 2007


Gaëtan Lehmann wrote:
> 
> It's better with the patch :-)
> 
> Le 10 juil. 07 à 12:29, Gaëtan Lehmann a écrit :
> 
>>
>> Hi,
>>
>> Erik Anderson has provided a fix for the build problem with python  
>> 2.5. A patch is attached.
>> All the python tests are OK.
>>
>> Can it be applied to cableswig?

I do not think the type "Py_ssize_t" exists before python 2.5, so this 
patch:

-  int psize = 0;
+  Py_ssize_t psize = 0;

will break builds with earlier python versions.  Please try this fix 
instead:

#if defined(PY_SSIZE_T_MAX)
  Py_ssize_t psize = 0;
#else
  int psize = 0;
#endif

-Brad


More information about the Insight-developers mailing list