[PATCH] Fix python_access on 64bits hosts
Raphaël Barrois
raphael.barrois+inn at xelmail.com
Mon Nov 1 13:47:39 UTC 2010
Le Sunday 31 October 2010 à 23:12:39, Julien ÉLIE a écrit :
> Hi Raphaël,
>
> > /* Make "s#" use Py_ssize_t rather than int. */
> > #define PY_SSIZE_T_CLEAN
> >
> > /* Define Py_ssize_t when it does not exist (Python < 2.5.0). */
> > #if PY_VERSION_HEX < 0x02050000
> >
> > typedef int Py_ssize_t;
> >
> > #endif
> >
> > /* Python.h must be included after having defined PY_SSIZE_T_CLEAN. */
> > #include "Python.h"
>
> You will of course have noticed that #include "Python.h" must occur
> before the typedef. Otherwise, there is a redefinition of Py_ssize_t,
> which triggers an error off.
>
>
> I have just successfully compiled the new code with both Python 2.4.6
> and Python 2.7 on a 32-bit architecture, using "make warnings".
>
> I hope it also works fine on your 64-bit system.
> Have a nice week-end,
It compiles correctly with make warnings on my host as well (Python 2.6.5, 64
bits, INN versions 2.5.1 and STABLE-20101031) ; I had to follow those steps :
"patch; configure; make; touch nnrpd/python.c innd/python.c; make warnings",
otherwise I had errors in other components.
I haven't tried to actually run the new version though, that requires some
gentoo ebuild-hacking ; I'll let you know if I discover any bug there.
--
Raphaël
More information about the inn-workers
mailing list